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-WebApp-AuthZ/5-2-Groups/README-incremental-instructions.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,30 +66,30 @@ Navigate to the `"5-WebApp-AuthZ"` folder
66
66
67
67
Now you have two different options available to you on how you can further configure your application to receive the `groups` claim.
68
68
69
-
1.[Receive **all the groups** that the signed-in user is assigned to in an Azure AD tenant, included nested groups](#configure-your-application-to-receive-all-the-groups-a-user-is-assigned-to-included-nested-groups).
70
-
1.[Receive the **groups** claim values from a **filtered set of groups** that your application is programmed to work with.](#configure-your-application-to-receive-the-groups-claim-values-from-a-filtered-set-of-groups-a-user-may-be-assigned-to). (Not available in the [Azure AD Free edition](https://azure.microsoft.com/pricing/details/active-directory/)).
69
+
1.[Receive **all the groups** that the signed-in user is assigned to in an Azure AD tenant, included nested groups](#configure-your-application-to-receive-all-the-groups-the-signed-in-user-is-assigned-to-included-nested-groups).
70
+
1.[Receive the **groups** claim values from a **filtered set of groups** that your application is programmed to work with](#configure-your-application-to-receive-the-groups-claim-values-from-a-filtered-set-of-groups-a-user-may-be-assigned-to). (Not available in the [Azure AD Free edition](https://azure.microsoft.com/pricing/details/active-directory/)).
71
71
72
72
> To get the on-premise group's `samAccountName` or `On Premises Group Security Identifier` instead of Group id, check out 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).
73
73
74
74
> To receive the `groups` claim with the object id of the security groups, please ensure that the user accounts you plan to sign-in to this app is assigned to a few security groups in this AAD tenant.
75
75
76
-
#####Configure your application to receive **all the groups** the signed-in user is assigned to, included nested groups
76
+
#### Configure your application to receive **all the groups** the signed-in user is assigned to, included nested groups
77
77
78
78
1. In the app's registration screen, click on the **Token Configuration** blade in the left to open the page where you can configure the claims provided tokens issued to your application.
79
79
1. Click on the **Add groups claim** button on top to open the **Edit Groups Claim** screen.
80
80
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.
81
81
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.
82
82
1. If you are exposing a Web API using the **Expose an API** option, then you can also choose the `Group ID` option under the **Access** section. 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 [Access Token](https://docs.microsoft.com/azure/active-directory/develop/access-tokens) issued to the client applications of your API.
83
83
84
-
#####Configure your application to receive the `groups` claim values from a **filtered set of groups** a user may be assigned to
84
+
#### Configure your application to receive the `groups` claim values from a **filtered set of groups** a user may be assigned to
85
85
86
-
######Prerequisites, benefits and limitations of using this option
86
+
##### Prerequisites, benefits and limitations of using this option
87
87
88
88
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.
89
89
1. This feature is not available in the [Azure AD Free edition](https://azure.microsoft.com/pricing/details/active-directory/).
90
90
1.**Nested group assignments** are not available when this option is utilized.
91
91
92
-
######Steps to enable this option in your app
92
+
##### Steps to enable this option in your app
93
93
94
94
1. In the app's registration screen, click on the **Token Configuration** blade in the left to open the page where you can configure the claims provided tokens issued to your application.
95
95
1. Click on the **Add groups claim** button on top to open the **Edit Groups Claim** screen.
Copy file name to clipboardExpand all lines: 5-WebApp-AuthZ/5-2-Groups/README.md
+5-7Lines changed: 5 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -127,7 +127,6 @@ As a first step you'll need to:
127
127
- If you don't have a platform added, select **Add a platform** and select the **Web** option.
128
128
- In the **Redirect URIs** section, enter the following redirect URIs.
129
129
-`https://localhost:44321/signin-oidc`
130
-
-`https://localhost:44321/Account/EndSession`
131
130
- In the **Logout URL** section, set it to `https://localhost:44321/signout-oidc`.
132
131
- In the **Implicit grant** section, check the **ID tokens** option as this sample requires
133
132
the [Implicit grant flow](https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-implicit-grant-flow) to be enabled to
@@ -137,22 +136,22 @@ As a first step you'll need to:
137
136
1. In the app's registration screen, click on the **Certificates & secrets** blade in the left to open the page where we can generate secrets and upload certificates.
138
137
1. In the **Client secrets** section, click on **New client secret**:
139
138
- Type a key description (for instance `app secret`),
140
-
- Select one of the available key durations (**In 1 year**, **In 2 years**, or **Never Expires**) as per your security concerns.
139
+
- Select one of the available key durations (**In 1 year**, **In 2 years**, or **Never Expires**) as per your security posture.
141
140
- The generated key value will be displayed when you click the **Add** button. Copy the generated value for use in the steps later.
142
141
- You'll need this key later in your code's configuration files. This key value will not be displayed again, and is not retrievable by any other means, so make sure to note it from the Azure portal before navigating to any other screen or blade.
143
142
1. In the app's registration screen, click on the **API permissions** blade in the left to open the page where we add access to the Apis that your application needs.
144
143
- Click the **Add a permission** button and then,
145
144
- Ensure that the **Microsoft APIs** tab is selected.
146
145
- In the *Commonly used Microsoft APIs* section, click on **Microsoft Graph**
147
-
- In the **Delegated permissions** section, select the **GroupMember.Read.All** in the list. Use the search box if necessary.
146
+
- In the **Delegated permissions** section, select the **Directory.Read.All** in the list. Use the search box if necessary.
148
147
- Click on the **Add permissions** button at the bottom.
149
148
150
149
#### Configure your application to receive the **groups** claim
151
150
152
151
Now you have two different options available to you on how you can further configure your application to receive the `groups` claim.
153
152
154
-
1.[Receive **all the groups** that the signed-in user is assigned to in an Azure AD tenant, included nested groups](#configure-your-application-to-receive-all-the-groups-a-user-is-assigned-to-included-nested-groups).
155
-
1.[Receive the **groups** claim values from a **filtered set of groups** that your application is programmed to work with.](#configure-your-application-to-receive-the-groups-claim-values-from-a-filtered-set-of-groups-a-user-may-be-assigned-to). (Not available in the [Azure AD Free edition](https://azure.microsoft.com/pricing/details/active-directory/)).
153
+
1.[Receive **all the groups** that the signed-in user is assigned to in an Azure AD tenant, included nested groups](#configure-your-application-to-receive-all-the-groups-the-signed-in-user-is-assigned-to-included-nested-groups).
154
+
1.[Receive the **groups** claim values from a **filtered set of groups** that your application is programmed to work with](#configure-your-application-to-receive-the-groups-claim-values-from-a-filtered-set-of-groups-a-user-may-be-assigned-to). (Not available in the [Azure AD Free edition](https://azure.microsoft.com/pricing/details/active-directory/)).
156
155
157
156
> To get the on-premise group's `samAccountName` or `On Premises Group Security Identifier` instead of Group id, check out 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).
158
157
@@ -278,7 +277,7 @@ If a user is member of more groups than the overage limit (**150 for SAML tokens
278
277
}
279
278
```
280
279
281
-
##### Create the overage scenario in this sample for testing
280
+
#### Create the overage scenario in this sample for testing
282
281
283
282
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.
284
283
1. When you run this sample and an overage occurred, then you'd see the `_claim_names` in the home page after the user signs-in.
@@ -325,7 +324,6 @@ This project was created using the following command.
325
324
using Microsoft.Identity.Web;
326
325
```
327
326
328
-
329
327
The following files have the code that would be of interest to you:
0 commit comments