An Azure managed PostgreSQL database service for app development and deployment.
Hi Serpa •,
This could be because the source server has AAD roles present on it which might not followed the pre-requisites of creating the roles on the target server before the migration.
To create the AAD roles on the target server, customer will have to create the roles on target server using this link. https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/how-to-manage-azure-ad-users .
There will be a log line present in logs which will also tell how many AAD roles are present on source server. Log line looks like: AAD Role ----------- is not present on target server.
Query used to figure AAD roles on source server is below.
If there is a mismatch between number of AAD roles reported by the query and actually present on the server.
SELECT
r.rolname
FROM
pg_roles r
JOIN pg_auth_members am ON r.oid = am.member
JOIN pg_roles m ON am.roleid = m.oid
WHERE
m.rolname IN (
'azure_ad_admin',
'azure_ad_user',
'azure_ad_mfa'
);
Let us know if this helps.
Awaiting your reply.
Thanks