Connecting to Azure Database for PostgreSQL using Azure AD

RamZ 1 Reputation point
2020-11-11T06:50:39.733+00:00

we are trying to connect to azure postgres DB using AD & followed the instructions provided in the below documentation url https://learn.microsoft.com/en-us/azure/postgresql/howto-configure-sign-in-aad-authentication

Getting below error while connecting to postgres DB. I Manually validated the object id & tenant id of the user & tenant id of token we got using this "az account get-access-token --resource https://ossrdbms-aad.database.windows.net" command. both seems fine. still getting below error.

Azure AD access token not valid for role xxxxx@tenant .onmicrosoft.com (oid or appid claim does not match 9d8b7b0a-9139-4c86-a5f1-ed39134b8699)
HINT: Did you specify the correct user name and access token?

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.
21,702 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Armando Cordova 5 Reputation points
    2024-04-15T11:24:40.31+00:00

    Actually I do get a connection sorry.

    However my terraform managed instance sayd that the function pgaadauth_create_principal doesnt exist

    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.