[Company Logo Image] 

Home Up Contents Coffee Break Credits Glossary Links Search

 
Error adding Entra Administrators to Postgresql

 

 

Home
Analysis Services
Azure
CLR Integration
High Availability
Open Source
Security
SQL Server 2008
SQL Server 2012
SQL Server 2014
SQL Server 2016
SQL Server 2017
SQL Server 2019
Tips
Troubleshooting
Tuning

Error adding Entra Administrators to Postgresql.


Applies to: Azure Database for PostgreSQL (Flexible Server).

Date created: June 19, 2025.
 

Problem Description.
 

On the Microsoft Entra Administrators section of an Azure Database for PostgreSQL Flexible Server (Azure Portal), I added one of my teammates with its corporate e-mail and saved the configuration.

 

 

When I saved the configuration a deployment started as if I were adding a new feature to the Flexible Server, but the deployment failed with the following error:

 

The error details are:
 

The error says it exists, but the login/user does not show in the list of the Microsoft Entra Administrators section on the Azure Database for PostgreSQL Flexible Server.

 

Cause.


The error we have encountered:

Failed to create Microsoft Entra principal. Reason: '42710: role "xxxxxx@xxxxxx.com" already exists'


means that a PostgreSQL role (user) with the name xxxxxx@xxxxxx.com already exists at the server level inside the Azure Database for PostgreSQL Flexible Server, even though it's not showing up in the Microsoft Entra Administrators list in the Azure Portal.


Solution
.


Using psql, Visual Studio Code, or DBeaver, connect to any database on your Flexible Server using the admin credentials, then run the following sql command:

DROP ROLE "xxxxxx@xxxxxx.com";

Go back to Microsoft Entra Administrators in the Azure Portal and reassign the user. This time, it should work successfully.
 

 

 

.Send mail to webmaster@sqlcoffee.com with questions or comments about this web site.