You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 5-AccessControl/2-call-api-groups/AppCreationScripts/Configure.ps1
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -327,8 +327,8 @@ Function UpdateTextFile([string] $configFilePath, [System.Collections.HashTable]
327
327
Write-Host"IMPORTANT: Please follow the instructions below to complete a few manual step(s) in the Azure portal":
328
328
Write-Host"- For client"
329
329
Write-Host" - Navigate to $clientPortalUrl"
330
-
Write-Host" - On Azure portal, create a group named GroupAdmin and assign some users to it, then configure your ID and Access token to emit GroupID in your app registration."-ForegroundColor Red
331
-
Write-Host" - On Azure portal, create a group named GroupMember and assign some users to it, then configure your ID and Access token to emit GroupID in your app registration."-ForegroundColor Red
330
+
Write-Host" - On Azure portal, create a security group named GroupAdmin and assign some users to it, then configure your ID and Access token to emit GroupID in your app registration."-ForegroundColor Red
331
+
Write-Host" - On Azure portal, create a security group named GroupMember and assign some users to it, then configure your ID and Access token to emit GroupID in your app registration."-ForegroundColor Red
332
332
Write-Host-ForegroundColor Green "------------------------------------------------------------------------------------------------"
Copy file name to clipboardExpand all lines: 5-AccessControl/2-call-api-groups/AppCreationScripts/sample.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -59,10 +59,10 @@
59
59
},
60
60
"ManualSteps": [
61
61
{
62
-
"Comment": "On Azure portal, create a group named 'GroupAdmin' and assign some users to it, then configure your ID and Access token to emit GroupID in your app registration."
62
+
"Comment": "On Azure portal, create a security group named GroupAdmin and assign some users to it. Afterwards, update the configuration files with the Object ID of the gruop you've just created."
63
63
},
64
64
{
65
-
"Comment": "On Azure portal, create a group named 'GroupMember' and assign some users to it, then configure your ID and Access token to emit GroupID in your app registration."
65
+
"Comment": "On Azure portal, create a security group named GroupMember and assign some users to it. Afterwards, update the configuration files with the Object ID of the gruop you've just created."
Copy file name to clipboardExpand all lines: 5-AccessControl/2-call-api-groups/README.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -228,7 +228,7 @@ Open the project in your IDE (like Visual Studio or Visual Studio Code) to confi
228
228
1. Find the key `Enter_the_Tenant_Info_Here` and replace the existing value with your Azure AD tenant/directory ID.
229
229
1. Find the key `Enter_the_Web_Api_Application_Id_Here` and replace the existing value with the application ID (clientId) of `msal-angular-app` app copied from the Azure portal.
230
230
231
-
### Create Security Groups
231
+
#### Create Security Groups
232
232
233
233
> :warning: You may already have security groups with the names below defined in your tenant and/or you may not have permissions to create new security groups. In that case, skip the steps below and update the configuration files in your project(s) with the desired names/IDs of the groups.
234
234
@@ -249,7 +249,7 @@ Open the project in your IDE (like Visual Studio or Visual Studio Code) to confi
249
249
250
250
For more information, visit: [Create a basic group and add members using Azure AD](https://docs.microsoft.com/azure/active-directory/fundamentals/active-directory-groups-create-azure-portal)
251
251
252
-
### Configure Security Groups
252
+
#### Configure Security Groups
253
253
254
254
You have two different options available to you on how you can further configure your application to receive the `groups` claim.
255
255
@@ -258,22 +258,22 @@ You have two different options available to you on how you can further configure
258
258
259
259
> To get the on-premise group's `samAccountName` or `On Premises Group Security Identifier` instead of Group ID, please refer to the document [Configure group claims for applications with Azure Active Directory](https://docs.microsoft.com/azure/active-directory/hybrid/how-to-connect-fed-group-claims#prerequisites-for-using-group-attributes-synchronized-from-active-directory).
260
260
261
-
#### Configure your application to receive **all the groups** the signed-in user is assigned to, including nested groups
261
+
##### Configure your application to receive **all the groups** the signed-in user is assigned to, including nested groups
262
262
263
263
1. In the app's registration screen, select the **Token Configuration** blade in the left to open the page where you can configure the claims provided tokens issued to your application.
264
264
1. Select the **Add groups claim** button on top to open the **Edit Groups Claim** screen.
265
265
1. Select `Security groups` **or** the `All groups (includes distribution lists but not groups assigned to the application)` option. Choosing both negates the effect of `Security Groups` option.
266
266
1. Under the **ID** section, select `Group ID`. This will result in Azure AD sending the [object id](https://docs.microsoft.com/graph/api/resources/group?view=graph-rest-1.0) of the groups the user is assigned to in the **groups** claim of the [ID Token](https://docs.microsoft.com/azure/active-directory/develop/id-tokens) that your app receives after signing-in a user.
267
267
268
-
#### Configure your application to receive the `groups` claim values from a **filtered set of groups** a user may be assigned to
268
+
##### Configure your application to receive the `groups` claim values from a **filtered set of groups** a user may be assigned to
269
269
270
-
##### Prerequisites, benefits and limitations of using this option
270
+
###### Prerequisites, benefits and limitations of using this option
271
271
272
272
1. This option is useful when your application is interested in a selected set of groups that a signing-in user may be assigned to and not every security group this user is assigned to in the tenant. This option also saves your application from running into the [overage](#groups-overage-claim) issue.
273
273
1. This feature is not available in the [Azure AD Free edition](https://azure.microsoft.com/pricing/details/active-directory/).
274
274
1. **Nested group assignments** are not available when this option is utilized.
275
275
276
-
##### Steps to enable this option in your app
276
+
###### Steps to enable this option in your app
277
277
278
278
1. In the app's registration screen, select the **Token Configuration** blade in the left to open the page where you can configure the claims provided tokens issued to your application.
279
279
1. Select the **Add groups claim** button on top to open the **Edit Groups Claim** screen.
@@ -295,17 +295,17 @@ You have two different options available to you on how you can further configure
295
295
>
296
296
> When you set **User assignment required?** to **Yes**, Azure AD will check that only users assigned to your application in the **Users and groups** blade are able to sign-in to your app. You can assign users directly or by assigning security groups they belong to.
297
297
298
-
### Configure the app to recognize Group IDs
298
+
#### Configure the app to recognize Group IDs
299
299
300
300
> :warning: During **Token Configuration**, if you have chosen any other option except **groupID** (e.g. like **DNSDomain\sAMAccountName**) you should enter the **group name** (for example `contoso.com\Test Group`) instead of the **object ID** below:
301
301
302
-
1. Open the `SPA\src\app\app-config.ts` file.
303
-
1. Find the app key `groups.groupAdmin` and replace the existing value with the **object ID** of the **GroupAdmin** group copied from the Azure portal.
304
-
1. Find the app key `groups.groupMember` and replace the existing value with the **object ID** of the **GroupMember** group copied from the Azure portal.
302
+
1. Open the `SPA\src\app\auth-config.ts` file.
303
+
1. Find the key `Enter the objectID for GroupAdmin group copied from Azure Portal` and replace the existing value with the **object ID** of the **GroupAdmin** group copied from the Azure portal.
304
+
1. Find the key `Enter the objectID for GroupMember group copied from Azure Portal` and replace the existing value with the **object ID** of the **GroupMember** group copied from the Azure portal.
305
305
306
306
1. Open the `API\TodoListAPI\appsettings.json` file.
307
-
2. Find the app key `Groups.GroupAdmin` and replace the existing value with the **object ID** of the **GroupAdmin** group copied from the Azure portal.
308
-
3. Find the app key `Groups.GroupMember` and replace the existing value with the **object ID** of the **GroupMember** group copied from the Azure portal.
307
+
2. Find the key `Enter the objectID for GroupAdmin group copied from Azure Portal` and replace the existing value with the **object ID** of the **GroupAdmin** group copied from the Azure portal.
308
+
3. Find the key `Enter the objectID for GroupMember group copied from Azure Portal` and replace the existing value with the **object ID** of the **GroupMember** group copied from the Azure portal.
309
309
310
310
### Step 6: Running the sample
311
311
@@ -377,7 +377,7 @@ If a user is member of more groups than the overage limit (**150 for SAML tokens
377
377
378
378
#### Create the Overage scenario for testing
379
379
380
-
1. You can use the `BulkCreateGroups.ps1` provided in the [App Creation Scripts](./AppCreationScripts/) folder to create a large number of groups and assign users to them. This will help test overage scenarios during development. Remember to change the user's **objectId** provided in the `BulkCreateGroups.ps1` script.
380
+
1. You can use the `BulkCreateGroups.ps1` provided in the [App Creation Scripts](./AppCreationScripts/) folder to create a large number of groups and assign users to them. This will help test overage scenarios during development. You'll need to enter a user Object ID when prompted by the `BulkCreateGroups.ps1` script.
381
381
382
382
When attending to overage scenarios, which requires a call to [Microsoft Graph](https://graph.microsoft.com) to read the signed-in user's group memberships, your app will need to have the [User.Read](https://docs.microsoft.com/graph/permissions-reference#user-permissions) and [GroupMember.Read.All](https://docs.microsoft.com/graph/permissions-reference#group-permissions) for the [getMemberGroups](https://docs.microsoft.com/graph/api/user-getmembergroups) API to execute successfully.
0 commit comments