Retrieving Managed Service Identity information

Perform the following steps:

  1. Authenticate your Azure Account's identity using Azure CLI by running the az login command in the Command Prompt, as shown in the following screenshot:

  1. You will be prompted to provide your Azure account credentials to log into the Azure portal. Once you have provided your credentials, it will show you the available subscriptions in the command console.
  1. Now we need to retrieve the service principle details by running the following command:
az resource show --name <<Function App Name>> --resource-group <<Resource Group>> --resource-type Microsoft.Web/sites --query identity
  1. If you have configured the managed identity properly, you will see something similar to the following as the output to the preceding command:

  1. Make a note of principalId, which is retrieved in the preceding step. We will be using it in the next section.