How to fix "Selected user account does not exist in tenant 'Microsoft Services'" when using Microsoft Entra to access Azure SQL Server?

Ryan M 0 Reputation points
2024-11-07T16:49:33.31+00:00

I'm encountering the following error when trying to access my Azure SQL Server using Microsoft Entra:

Selected user account does not exist in tenant 'Microsoft Services' and cannot access the application '04b07795-8ddb-461a-bbee-02f9e1bf7b46' in that tenant. The account needs to be added as an external user in the tenant first. Please use a different account.

The process I've followed looks like this:

  1. I create an Azure SQL Server with Microsoft Entra Authentication Only selected.
  2. I set myself as the Microsoft Entra Admin.
  3. I wait for the database server and database instance to initialize.
  4. I run a Python script on my machine that accesses the new Azure SQL database, creates some tables and imports data from a local database. On this step, the Azure login page appears and I select my account to log in with. The error above is displayed.

I've looked in "Manage Tenants" in Microsoft Entra ID, but the Microsoft Services tenant doesn't appear. I have no idea how to fix this issue.

Azure SQL Database
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
22,299 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.