Task 01 - Get User Id from Entra ID
Description
In this task, you will retrieve the ID for your user account / login from Entra ID. This will be needed in the next tasks so the ARM Template deployment can use this value.
Success Criteria
- You have retrieved all the necessary information.
Solution
Expand this section to view the solution
-
Sign in to the Azure Portal.
If you’re using Azure Gov, sign in to the Azure Gov Portal.
-
At the top of the Azure Portal, select the Cloud Shell icon.
-
In the Cloud Shell, run the following Azure CLI command. This will retrieve the Entra ID information for your login.
az ad signed-in-user show
-
Copy the id and userPrincipalName values from the returned output from the Azure CLI command and save it for use later.
The ARM Template will use this user Id and Name as the Administrator for the Azure SQL Managed Instance resource. This user must be an Entra ID user and cannot be a personal Microsoft Account. If you need to, look up an alternative user to use for this, then run the following command instead:
az ad user show --id <azure-login>
Replace the
<azure-login>
placeholder with the user’s email login. Ex:user@domain.onmicrosoft.com