Skip to content

Commit 558401e

Browse files
Merge pull request #208576 from rwike77/objectid
updated az cli script
2 parents c31f953 + c849521 commit 558401e

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

articles/active-directory/develop/multi-service-web-app-access-microsoft-graph-as-app.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ manager: CelesteDG
88
ms.service: app-service-web
99
ms.topic: tutorial
1010
ms.workload: identity
11-
ms.date: 04/25/2022
11+
ms.date: 08/19/2022
1212
ms.author: ryanwi
1313
ms.reviewer: stsoneff
1414
ms.devlang: csharp, javascript
@@ -90,7 +90,7 @@ webAppName="SecureWebApp-20201106120003"
9090
9191
spId=$(az resource list -n $webAppName --query [*].identity.principalId --out tsv)
9292
93-
graphResourceId=$(az ad sp list --display-name "Microsoft Graph" --query [0].objectId --out tsv)
93+
graphResourceId=$(az ad sp list --display-name "Microsoft Graph" --query [0].id --out tsv)
9494
9595
appRoleId=$(az ad sp list --display-name "Microsoft Graph" --query "[0].appRoles[?value=='User.Read.All' && contains(allowedMemberTypes, 'Application')].id" --output tsv)
9696

articles/app-service/includes/tutorial-microsoft-graph-as-app/introduction.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ manager: CelesteDG
66
ms.service: app-service-web
77
ms.topic: include
88
ms.workload: identity
9-
ms.date: 01/21/2022
9+
ms.date: 08/19/2022
1010
ms.author: ryanwi
1111
ms.reviewer: stsoneff
1212
ms.devlang:
@@ -90,7 +90,7 @@ When accessing the Microsoft Graph, the managed identity needs to have proper pe
9090
9191
spId=$(az resource list -n $webAppName --query [*].identity.principalId --out tsv)
9292
93-
graphResourceId=$(az ad sp list --display-name "Microsoft Graph" --query [0].objectId --out tsv)
93+
graphResourceId=$(az ad sp list --display-name "Microsoft Graph" --query [0].id --out tsv)
9494
9595
appRoleId=$(az ad sp list --display-name "Microsoft Graph" --query "[0].appRoles[?value=='User.Read.All' && contains(allowedMemberTypes, 'Application')].id" --output tsv)
9696

articles/app-service/scenario-secure-app-access-microsoft-graph-as-app.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ manager: CelesteDG
88
ms.service: app-service-web
99
ms.topic: tutorial
1010
ms.workload: identity
11-
ms.date: 01/21/2022
11+
ms.date: 08/19/2022
1212
ms.author: ryanwi
1313
ms.reviewer: stsoneff
1414
ms.devlang: csharp
@@ -22,7 +22,6 @@ ms.custom: azureday1, devx-track-azurepowershell
2222

2323
## Call Microsoft Graph
2424

25-
2625
The [ChainedTokenCredential](/dotnet/api/azure.identity.chainedtokencredential), [ManagedIdentityCredential](/dotnet/api/azure.identity.managedidentitycredential), and [EnvironmentCredential](/dotnet/api/azure.identity.environmentcredential) classes are used to get a token credential for your code to authorize requests to Microsoft Graph. Create an instance of the [ChainedTokenCredential](/dotnet/api/azure.identity.chainedtokencredential) class, which uses the managed identity in the App Service environment or the development environment variables to fetch tokens and attach them to the service client. The following code example gets the authenticated token credential and uses it to create a service client object, which gets the users in the group.
2726

2827
To see this code as part of a sample application, see the:

0 commit comments

Comments
 (0)