question

ShahGaurang-3783 avatar image
0 Votes"
ShahGaurang-3783 asked OuryBa-MSFT commented

Azure Postgres Server with AAD authentication

I am trying using Azure Postgres for my application backend and realize that I can't use username and password I normally use. I need to generate the token and then use token as password.

reference: https://docs.microsoft.com/en-us/azure/postgresql/concepts-aad-authentication

Questions

Is there a way I can use username and password (not token) with Azure AD user or SPN?
If not how to use SPN with my application? how to refresh token?
Does azure postgres local user makes more sense ?

azure-ad-authenticationazure-database-postgresql
· 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.

Hello @ShahGaurang-3783 Thank you for posting your question. Azure AD user authentication will be through AAD. That is right you cannot use username and password.
I am working with PG to check if you can use SPN with your app. I will get back to you.
Regards,
Oury

0 Votes 0 ·

1 Answer

OuryBa-MSFT avatar image
0 Votes"
OuryBa-MSFT answered OuryBa-MSFT commented

Hi @ShahGaurang-3783 You can create user that does not need to be authenticated using AAD. However, if you mark a user to AAD authentication, then that will be the only way.
Regards,
Oury

· 2
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.

@OuryBa-MSFT
Can I have SPN created this way? And how's it's different than local postgres user, will this user be part of AAD but will use some other kind of authentication if so, which? And how can I mark any user/spn to not use AAD Authentication?

0 Votes 0 ·

Hi @ShahGaurang-3783 Can I have SPN created this way? Could you please clarify the question?
Regards,
Oury

0 Votes 0 ·