Connecting to Azure SQL Database: Requested tenant identifier ‘00000000-0000-0000-0000-000000000000’ is not valid.2
May 20, 2020 by Kenneth Fisher
The other day I got this rather interesting error while connecting to an Azure SQL DB.
I was connecting using Azure Active Directory – Universal with MFA authentication.
Unfortunately my Google/Bing-fu wasn’t up to the task of finding a post with the answer. But, after a bunch of searching and testing I did manage to figure it out for myself, so that was good. Simply enough the Active Directory Admin wasn’t set for the Azure SQL Server. If you go to the Overview tab for the server you’ll see this over on the right side.
Notice that it currently shows the Active Directory Admin as Not configured. To configure it just click on Not configured or the Active Directory Admin tab under Settings. That will take you to here:
From there just hit Set Admin at the top and pick the user or group that will be the admin. Since there can only be one admin, I highly recommend using a group if this is for work. That way multiple people can have access at the same time (for those that have a multi person DBA team this is essential IMO) and because people come and go in any job. This way it’s simple enough to change the membership of the group and not have to change every Azure SQL Server any time your DBA changes. For personal use this is far less important of course.