Add User to Azure SQL DB and Assign permissions

How to assign User Connect Permissions to Azure DB

CREATE USER [[email protected]] FROM EXTERNAL PROVIDER;

How to find current Roles assigned to Azure DB

SELECT DISTINCT pr.principal_id, pr.name, pr.type_desc, 
    pr.authentication_type_desc, pe.state_desc, pe.permission_name
FROM sys.database_principals AS pr
JOIN sys.database_permissions AS pe
    ON pe.grantee_principal_id = pr.principal_id;

How to assign User Role to Azure DB

ALTER ROLE db_datawrite ADD MEMBER [[email protected]];
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...