Hello James R
As Saraswathi Devadula mentioned in the comment the Microsoft Entra admin is stored in the server's master
database as a user (database principal). Since database principal names must be unique, the display name of the admin can't be the same as the name of any user in the server's master
database. If a user with the name already exists, the Microsoft Entra admin setup fails. But you have issue with login as that user in order to get access to the Azure SQL server instance.
To work around the issue, you can create a Service principal (App registration) to temporarily login into the database and rename or drop the existing SQL user.
- First create an app registration from
Microsoft Entra Id >> App Registration >> New Application
.
- After creating application create client secret and store it to use it as password.
- Then Add this Service principal as Microsoft Entra admin.
- Login With Service Principal authentication, enter the client ID in the User name field and the secret in the Password field.
- After successful login alter the username that causing error while adding Microsoft Entra admin.
ALTER USER [******@domain.com] WITH NAME = [******@domain.com1];
GO
This command will rename the azure SQL user.
- Now, you can remove the service principal as admin and set the appropriate user as Entra admin.