question

JonastadosSantos-9993 avatar image
0 Votes"
JonastadosSantos-9993 asked vipulsparsh-MSFT commented

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

Hi Folks,

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

https://docs.microsoft.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-ad-authenticationazure-database-postgresql
image.png (18.2 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@JonastadosSantos-9993 At this point I would suggest you to open a support case with us. This can be better handled over a case.

0 Votes 0 ·

1 Answer

JonastadosSantos-9993 avatar image
0 Votes"
JonastadosSantos-9993 answered

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

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.