How can I check what database level permissions are assigned to an azure ad security group in Azure postgres flexible server?

36226516 0 Reputation points
2024-04-22T17:43:07.6366667+00:00

I have an azure database flexible server instance and created a role using SELECT * FROM pgaadauth_create_principal('azure ad security group name', false, false) and assigned permissions read, write permissions to it to a database. Now I want to list out the permissions of this user to the particular database.

Azure Database for PostgreSQL
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,560 questions
{count} votes

1 answer

Sort by: Most helpful
  1. 36226516 0 Reputation points
    2024-04-23T10:40:55.26+00:00

    Thanks for your reply @Oury Ba-MSFT .

    I have figured it out, actually the database does not have any table in public schema, hence it is not showing the role and its permission. once any table is created then it wil reflect the permission. I use below script to get list of roles in a database and their permission.

    SELECT table_catalog, table_schema, table_name, privilege_type FROM   information_schema.table_privileges WHERE  grantee = 'MY_USER'

    0 comments No comments