Can't add an Azure Active Directory user group to even when group is assigned to the DB as a contributer: Principal '' could not be found or this principal type is not supported.

SB84 1 Reputation point
2021-10-27T12:22:30.213+00:00

I have three azure active directory groups I need to grant access to our Azure AQL DB. Using the following query I managed to grant access to two out of the three:

CREATE USER [DLG-users-DataAnalyst] FROM  EXTERNAL PROVIDER   
GO  

And these groups can be seen here:

144223-image.png

But when I try to my DLG-users-DataEngineer group I get the following error:

144232-image.png

I know users has a lower case u, but surely this shouldn't stop the adding of a user group

![144128-image.png]3

I have tried adding the group to the subscription as contributor and individually to the database. Always the same error

Azure SQL Database
Microsoft Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. James Hamil 27,221 Reputation points Microsoft Employee Moderator
    2021-10-30T00:04:07.03+00:00

    Hi @SB84 , you may need to change your query. From this article: https://community.dynamics.com/crm/b/crmchap/posts/principal-could-not-be-found-or-this-principal-type-is-not-supported-error-azure-sql-server

    you may have to add the tenant name for example:

    CREATE USER [john.smith_domain.co.uk#EXT#@test.onmicrosoft.com] FROM EXTERNAL PROVIDER  
    

    Please let me know if this works or if you have any questions.

    If this answer helped you please mark it as "Verified" so other users may reference it.

    Thank you,
    James


  2. Mohammed ZYADI 1 Reputation point
    2023-04-03T16:27:33.63+00:00

    Hello,

    I have the same issue i'm trying to add an azure AD group to azure sql database and got an error when typing the flowing command:

    CREATE USER [S-ONE_NONPRD_DB] FROM EXTERNAL PROVIDER

    Msg 33132, Level 16, State 1, Line 1

    This principal type is not supported in Azure SQL Database.

    Thank you for your help.

    Regards

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.