Quick answer: The AADSTS900021 error with an empty tenant GUID can occur when Microsoft Entra authentication is used against an Azure SQL logical server without a properly configured Microsoft Entra administrator. Set or update the Microsoft Entra admin for the logical server, then reconnect using Microsoft Entra authentication.

Error

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

Cause

The Microsoft Entra administrator for the Azure SQL logical server is not configured correctly for the account being used. Microsoft Entra authentication requires a Microsoft Entra administrator to be configured for the logical server.

Azure SQL logical server without a Microsoft Entra administrator

Solution

1. Open the Azure portal and navigate to the Azure SQL logical server.

2. Under Settings, select Microsoft Entra ID and then select Set admin.

Set Microsoft Entra administrator for an Azure SQL logical server

3. Select the Microsoft Entra user or group that should be the server administrator and click Select.

Select a Microsoft Entra administrator for Azure SQL

4. Click Save. After the administrator is configured, reconnect to Azure SQL using Microsoft Entra authentication.

Pro tips:
1. You can assign a Microsoft Entra group as the server administrator when appropriate.
2. Make sure the Azure portal is using the Microsoft Entra directory that contains the Azure SQL resource.

Available on Microsoft Store

SSRS Reports Migration Wizard

A simple Windows tool for migrating SSRS reports, data sources, and related configurations between report servers.

See more

Visual Studio Marketplace

SSIS Catalog Migration Wizard

Extend Visual Studio with an easy way to migrate SSIS Catalog projects.

Kunal Rathi

With over 15 years of experience in data engineering and analytics, I've assisted countless clients in gaining valuable insights from their data. As a dedicated supporter of Data, Cloud and DevOps, I'm excited to connect with individuals who share my passion for this field. If my work resonates with you, we can talk and collaborate.