简体   繁体   中英

For an Azure App service with a managed identity, how to retrieve the Client ID

How can I retrieve the client id of an Azure Web App (or App Service, generally) for a system-assigned identity? In the identity blade, I only see object id.

I need this to enable AAD service to service access, and the service I am calling will authorize my request using my client id that it extracts from the token I send it. However, I don't know how to find my client id.

When you enable System Assigned Managed Service Identity for your App Service web app, it creates a Service Principal (visible under Enterprise applications in Azure Portal).

Even though you can only see the Object ID in Identity blade for App Service, but you can find a few more details including Application ID (or Client ID as you ask) by going to Azure Portal > Azure Active Directory > Enterprise Applications > All Applications > Relevant Service Principal (you can figure out using display name which is same as your web app or the Object ID). More detailed steps along with screenshots below.

Please note that even though you can get to Application ID and some details for MSI, you will not find an actual app registration for it.

  • For example, I have an App Service named "RohitMSIWebApp1" as shown here

    在此处输入图片说明

  • Go to Azure Portal > Azure Active Directory > Enterprise Applications > All Applications

    在此处输入图片说明

  • Enter the display name of your web app in search box, to filter it to the relevant service principal

    在此处输入图片说明

  • Go to the properties of Service Principal for more details

    在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM