Cannot connect to the server [primary domain name] when trying to Authenticate with AD to PostgreSQL

Jonasta dos Santos 1 Reputation point
2021-06-18T01:13:43.883+00:00

Hi Folks,

Im trying to follow this documentation, so I can authenticate to PostgreSQL using AAD

https://video2.skills-academy.com/en-us/azure/postgresql/howto-configure-sign-in-aad-authentication

106740-image.png

  1. I set the DB AD Admin as the authenticating user (jota@[......]hotmail.onmicrosoft.com)
  2. Im able to get a token for this user from https://ossrdbms-aad.database.windows.net

But when I try to connect using psql / PgAdmin / Azure Data Studio clients... it always throws the same error:

FATAL: Cannot connect to the server [......]hotmail.onmicrosoft.com (the domain of the user)

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,699 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Jonasta dos Santos 1 Reputation point
    2021-06-18T13:15:28.31+00:00

    Also, When I log in using User/Password it works... so Im pretty sure that its something with AD authentication... any Ideas?

    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.