Azure login with 2FA AD group login user (DB_Owner account) not allowing schema creation, whereas, normal AD/LAN login user able to create it

Viewed 96

The user Miva.TestAccount6@resolutionlife.com.au is part of AD group.

AD Group is mapped to DB Role (DB_OWNER)

When user Miva.TestAccount6@resolutionlife.com.au try to create scheama we are getting below error

Create Scheam [test123442];

Msg 2760, Level 16, State 1, Line 5
The specified schema name "Miva.TestAccount6@resolutionlife.com.au" either does not exist or you do not have permission to use it.
Msg 2759, Level 16, State 0, Line 5
CREATE SCHEMA failed due to previous errors.

When i created a normal ad user rather than ad group, user able to create the schema

1 Answers

It seems like for this member of the group, the default schema that SQL Engine is using is the user account not dbo.

In order to mitigate this issue, you need to specify the schema default name at the moment of the creation of the group using the default_schema option.

In addition, if you are facing issue in creating the table also, specify the schema name in the name of the table , like this one: CREATE TABLE dbo.TableExample (id int) every member of the group are able to without problem.

Source: https://techcommunity.microsoft.com/t5/azure-database-support-blog/lesson-learned-54-the-specified-schema-name-name-domain-com/ba-p/369152#

Related