Skip to content

Commit 4afb735

Browse files
authored
Merge pull request #97013 from tehnoonr/patch-5
Fixing PowerShell Script to Grant AAD Permissions
2 parents bdf8ec0 + 29ae789 commit 4afb735

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

articles/api-management/api-management-howto-aad.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ Now that you've enabled access for users in an Azure AD tenant, you can:
150150

151151
Follow these steps to grant:
152152
* `User.Read` **delegated** permission for Microsoft Graph API.
153-
153+
* `Directory.ReadAll` **application** permission for Microsoft Graph API.
154154
1. Update the first 3 lines of the following Azure CLI script to match your environment and run it.
155155

156156
```azurecli
@@ -160,8 +160,8 @@ Follow these steps to grant:
160160
#Login and Set the Subscription
161161
az login
162162
az account set --subscription $subId
163-
#Assign the following permission: Microsoft Graph Delegated Permission: User.Read
164-
az rest --method PATCH --uri "https://graph.microsoft.com/v1.0/$($tenantId)/applications/$($appObjectID)" --body "{'requiredResourceAccess':[{'resourceAccess': [{'id': 'e1fe6dd8-ba31-4d61-89e7-88639da4683d','type': 'Scope'}],'resourceAppId': '00000003-0000-0000-c000-000000000000'}]}"
163+
#Assign the following permission: Microsoft Graph Delegated Permission: User.Read, Microsoft Graph Application Permission: Directory.ReadAll
164+
az rest --method PATCH --uri "https://graph.microsoft.com/v1.0/$($tenantId)/applications/$($appObjectID)" --body "{'requiredResourceAccess':[{'resourceAccess': [{'id': 'e1fe6dd8-ba31-4d61-89e7-88639da4683d','type': 'Scope'},{'id': '7ab1d382-f21e-4acd-a863-ba3e13f7da61','type': 'Role'}],'resourceAppId': '00000003-0000-0000-c000-000000000000'}]}"
165165
```
166166

167167
1. Sign out and sign back in to the Azure portal.

0 commit comments

Comments
 (0)