Requested tenant identifier ‘00000000-0000-0000-0000-000000000000’ is not valid. Tenant identifiers may not be an empty GUID Azure SQL Connection

AADSTS900021: Requested tenant identifier '00000000-0000-0000-0000-000000000000' is not valid. Tenant identifiers may not be an empty GUID.

Error

AADSTS900021: Requested tenant identifier ‘00000000-0000-0000-0000-000000000000’ is not valid. Tenant identifiers may not be an empty GUID Azure SQL Connection.

Cause

SQL Server Management Studio can establish the connection to the SQL Server database using Azure Active Directory – Universal with MFA. This is because the Azure Active Directory user trying to log in to Azure SQL database is not set as Admin.

Solution

Follow below simple steps to solve the issue.

1. log in to Azure portal and navigate to Azure SQL Server resource.

2. Search for the Azure Active Directory user you need to grant Admin access to the selected Azure SQL Server. Once you select the user, click save, and you should see the user added as an admin, as shown in the below image.

Add admin account to Azure SQL Server

3. Once this is done, your connection to Azure SQL database with Azure Active Directory – Universal with MFA should work fine.

Pro tips:
1. You can add multiple users to Azure SQL Server as an admin. To do this, create a security group in Azure Active Directory and add needed people to the security group. And then, add this security group as an admin by following the above steps.

Kunal Rathi

Been working in the data engineering and analytics space for over a decade. Helping customers transform their data into insights, Cloud & DevOps enthusiast.