Azure / azure-postgresql

Azure Database for PostgreSQL (fully managed service for PostgreSQL in Azure)
MIT License
77 stars 78 forks source link

Azure AD Authentication in Postgres SQL #81

Open tapasudenia opened 4 years ago

tapasudenia commented 4 years ago

Hello, I am trying to create an Azure AD role in postgres server with the pipeline. I login with the Azure AD Admin (configured in the ARM template). This Azure AD admin is a AAD group in the same tenant. However when I am trying to run the query CREATE ROLE "userID@tenant-domain.onmicrosoft.com" WITH LOGIN PASSWORD 'Azure Object ID' IN ROLE azure_ad_user with pipeline , it throws below error. The same query when run through the Azure Data Studio with Azure AD admin login (same), works well. The pipeline service principal has the graph permissions too. Has anyone come across this kind of scenario in Postgres?

Please help. The goal is to create a Azure AD user through pipeline.

image