Skip to content

Commit 1c44361

Browse files
Merge pull request #234931 from dlepow/grp
[APIM] Permissions to add Azure AD groups
2 parents d27fb8b + ebea50a commit 1c44361

File tree

1 file changed

+5
-20
lines changed

1 file changed

+5
-20
lines changed

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

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description: Learn how to enable user sign-in to the API Management developer po
66
author: dlepow
77
ms.service: api-management
88
ms.topic: article
9-
ms.date: 03/17/2023
9+
ms.date: 04/18/2023
1010
ms.author: danlep
1111
ms.custom: engagement-fy23
1212
---
@@ -152,26 +152,11 @@ Now that you've enabled access for users in an Azure AD tenant, you can:
152152
* Add Azure AD groups into API Management.
153153
* Control product visibility using Azure AD groups.
154154

155-
Follow these steps to grant:
156-
* `User.Read` **delegated** permission for Microsoft Graph API.
157-
* `Directory.ReadAll` **application** permission for Microsoft Graph API.
158-
159-
1. Update the first 3 lines of the following Azure CLI script to match your environment and run it.
160-
161-
```azurecli
162-
$subId = "Your Azure subscription ID" # Example: "1fb8fadf-03a3-4253-8993-65391f432d3a"
163-
$tenantId = "Your Azure AD Tenant or Organization ID" # Example: 0e054eb4-e5d0-43b8-ba1e-d7b5156f6da8"
164-
$appObjectID = "Application Object ID that has been registered in AAD" # Example: "2215b54a-df84-453f-b4db-ae079c0d2619"
165-
#Login and Set the Subscription
166-
az login
167-
az account set --subscription $subId
168-
#Assign the following permission: Microsoft Graph Delegated Permission: User.Read, Microsoft Graph Application Permission: Directory.ReadAll
169-
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'}]}"
170-
```
171-
172-
1. Sign out and sign back in to the Azure portal.
173155
1. Navigate to the App Registration page for the application you registered in [the previous section](#enable-user-sign-in-using-azure-ad---portal).
174-
1. Select **API Permissions**. You should see the permissions granted by the Azure CLI script in step 1.
156+
1. Select **API Permissions**.
157+
1. Add the following minimum **application** permissions for Microsoft Graph API:
158+
* `User.Read.All` application permission – so API Management can read the user’s group membership to perform group synchronization at the time the user logs in.
159+
* `Group.Read.All` application permission – so API Management can read the Azure AD groups when an administrator tries to add the group to API Management using the **Groups** blade in the portal.
175160
1. Select **Grant admin consent for {tenantname}** so that you grant access for all users in this directory.
176161

177162
Now you can add external Azure AD groups from the **Groups** tab of your API Management instance.

0 commit comments

Comments
 (0)