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: articles/active-directory/develop/active-directory-optional-claims.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,9 +9,9 @@ ms.service: active-directory
9
9
ms.subservice: develop
10
10
ms.topic: how-to
11
11
ms.workload: identity
12
-
ms.date: 12/3/2021
12
+
ms.date: 04/04/2022
13
13
ms.author: ryanwi
14
-
ms.reviewer: paulgarn, ludwignick, keyam
14
+
ms.reviewer: paulgarn, ludwignick
15
15
ms.custom: aaddev
16
16
---
17
17
@@ -52,7 +52,7 @@ The set of optional claims available by default for applications to use are list
52
52
|`ctry`| User's country/region | JWT || Azure AD returns the `ctry` optional claim if it's present and the value of the field is a standard two-letter country/region code, such as FR, JP, SZ, and so on. |
53
53
|`email`| The reported email address for this user | JWT, SAML | MSA, Azure AD | This value is included by default if the user is a guest in the tenant. For managed users (the users inside the tenant), it must be requested through this optional claim or, on v2.0 only, with the OpenID scope. This value is not guaranteed to be correct, and is mutable over time - never use it for authorization or to save data for a user. For more information, see [Validate the user has permission to access this data](access-tokens.md#validate-the-user-has-permission-to-access-this-data). If you require an addressable email address in your app, request this data from the user directly, using this claim as a suggestion or pre-fill in your UX. |
54
54
|`fwd`| IP address.| JWT || Adds the original IPv4 address of the requesting client (when inside a VNET) |
55
-
| `groups`| Optional formatting for group claims |JWT, SAML| |Used with the GroupMembershipClaims setting in the [application manifest](reference-app-manifest.md), which must be set as well. For details see [Group claims](#configuring-groups-optional-claims) below. For more information about group claims, see [How to configure group claims](../hybrid/how-to-connect-fed-group-claims.md)
55
+
| `groups`| Optional formatting for group claims |JWT, SAML| |For details see [Group claims](#configuring-groups-optional-claims) below. For more information about group claims, see [How to configure group claims](../hybrid/how-to-connect-fed-group-claims.md). Used with the GroupMembershipClaims setting in the [application manifest](reference-app-manifest.md), which must be set as well.
56
56
|`idtyp`| Token type | JWT access tokens | Special: only in app-only access tokens | Value is `app` when the token is an app-only token. This is the most accurate way for an API to determine if a token is an app token or an app+user token.|
57
57
|`login_hint`| Login hint | JWT | MSA, Azure AD | An opaque, reliable login hint claim. This claim is the best value to use for the `login_hint` OAuth parameter in all flows to get SSO. It can be passed between applications to help them silently SSO as well - application A can sign in a user, read the `login_hint` claim, and then send the claim and the current tenant context to application B in the query string or fragment when the user clicks on a link that takes them to application B. To avoid race conditions and reliability issues, the `login_hint` claim *doesn't* include the current tenant for the user, and defaults to the user's home tenant when used. If you are operating in a guest scenario, where the user is from another tenant, then you must still provide a tenant identifier in the sign in request, and pass the same to apps you partner with. This claim is intended for use with your SDK's existing `login_hint` functionality, however that it exposed. |
58
58
|`sid`| Session ID, used for per-session user sign-out. | JWT | Personal and Azure AD accounts. ||
@@ -239,7 +239,7 @@ Within the SAML tokens, these claims will be emitted with the following URI form
239
239
This section covers the configuration options under optional claims for changing the group attributes used in group claims from the default group objectID to attributes synced from on-premises Windows Active Directory. You can configure groups optional claims for your application through the UI or application manifest.
240
240
241
241
> [!IMPORTANT]
242
-
> For more details including important caveats for group claims from on-premises attributes, see [Configure group claims for applications with Azure AD](../hybrid/how-to-connect-fed-group-claims.md).
242
+
> Azure AD limits the number of groups emitted in a token to 150 for SAML assertions and 200 for JWT, including nested groups. For more details on group limits and important caveats for group claims from on-premises attributes, see [Configure group claims for applications with Azure AD](../hybrid/how-to-connect-fed-group-claims.md).
243
243
244
244
**Configuring groups optional claims through the UI:**
245
245
@@ -250,7 +250,9 @@ This section covers the configuration options under optional claims for changing
250
250
1. Select the application you want to configure optional claims for in the list.
251
251
1. Under **Manage**, select **Token configuration**.
252
252
1. Select **Add groups claim**.
253
-
1. Select the group types to return (**Security groups**, or **Directory roles**, **All groups**, and/or **Groups assigned to the application**). The **Groups assigned to the application** option includes only groups assigned to the application. The **All Groups** option includes **SecurityGroup**, **DirectoryRole**, and **DistributionList**, but not **Groups assigned to the application**.
253
+
1. Select the group types to return (**Security groups**, or **Directory roles**, **All groups**, and/or **Groups assigned to the application**):
254
+
- The **Groups assigned to the application** option includes only groups assigned to the application. The **Groups assigned to the application** option is recommended for large organizations due to the group number limit in token. To change the groups assigned to the application, select the application from the **Enterprise applications** list. Select **Users and groups** and then **Add user/group**. Select the group(s) you want to add to the application from **Users and groups**.
255
+
- The **All Groups** option includes **SecurityGroup**, **DirectoryRole**, and **DistributionList**, but not **Groups assigned to the application**.
254
256
1. Optional: select the specific token type properties to modify the groups claim value to contain on premises group attributes or to change the claim type to a role.
Copy file name to clipboardExpand all lines: articles/active-directory/hybrid/how-to-connect-fed-group-claims.md
+10-6Lines changed: 10 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ ms.subservice: hybrid
9
9
ms.service: active-directory
10
10
ms.workload: identity
11
11
ms.topic: how-to
12
-
ms.date: 01/05/2022
12
+
ms.date: 04/05/2022
13
13
ms.author: billmath
14
14
author: billmath
15
15
---
@@ -21,12 +21,13 @@ Azure Active Directory (Azure AD) can provide a user's group membership informat
21
21
- Groups identified by their Azure AD object identifier (OID) attribute
22
22
- Groups identified by the `sAMAccountName` or `GroupSID` attribute for Active Directory-synchronized groups and users
23
23
24
+
> [!IMPORTANT]
25
+
> The number of groups emitted in a token is limited to 150 for SAML assertions and 200 for JWT, including nested groups. In larger organizations, the number of groups where a user is a member might exceed the limit that Azure AD will add to a token. Exceeding a limit can lead to unpredictable results. For workarounds to these limits, read more in [Important caveats for this functionality](#important-caveats-for-this-functionality).
26
+
24
27
## Important caveats for this functionality
25
28
26
29
- Support for use of `sAMAccountName` and security identifier (SID) attributes synced from on-premises is designed to enable moving existing applications from Active Directory Federation Services (AD FS) and other identity providers. Groups managed in Azure AD don't contain the attributes necessary to emit these claims.
27
-
- In larger organizations, the number of groups where a user is a member might exceed the limit that Azure AD will add to a token. Those limits are 150 groups for a SAML token and 200 for a JSON Web Token (JWT). Exceeding a limit can lead to unpredictable results.
28
-
29
-
If your users have large numbers of group memberships, we recommend using the option to restrict the groups emitted in claims to the relevant groups for the application. If assigning groups to your applications is not possible, you can configure a [group filter](#group-filtering) to reduce the number of groups emitted in the claim.
30
+
- In order to avoid the number of groups limit if your users have large numbers of group memberships, you can restrict the groups emitted in claims to the relevant groups for the application. Read more about emitting groups assigned to the application for [JWT tokens](..\develop\active-directory-optional-claims.md#configuring-groups-optional-claims) and [SAML tokens](#add-group-claims-to-tokens-for-saml-applications-using-sso-configuration). If assigning groups to your applications is not possible, you can also configure a [group filter](#group-filtering) to reduce the number of groups emitted in the claim. Group filtering applies to tokens emitted for apps where group claims and filtering was configured in the **Enterprise apps** blade in the portal.
30
31
- Group claims have a five-group limit if the token is issued through the implicit flow. Tokens requested via the implicit flow will have a `"hasgroups":true` claim only if the user is in more than five groups.
31
32
- We recommend basing in-app authorization on application roles rather than groups when:
32
33
@@ -99,7 +100,7 @@ To configure group claims for a gallery or non-gallery SAML application via sing
99
100
|**All groups**| Emits security groups and distribution lists and roles. |
100
101
|**Security groups**| Emits security groups that the user is a member of in the groups claim. |
101
102
|**Directory roles**| If the user is assigned directory roles, they're emitted as a `wids` claim. (The group's claim won't be emitted.) |
102
-
|**Groups assigned to the application**| Emits only the groups that are explicitly assigned to the application and that the user is a member of. |
103
+
|**Groups assigned to the application**| Emits only the groups that are explicitly assigned to the application and that the user is a member of. Recommended for large organizations due to the group number limit in token. |
103
104
104
105
- For example, to emit all the security groups that the user is a member of, select **Security groups**.
105
106
@@ -136,7 +137,10 @@ Some applications require the group membership information to appear in the role
136
137
> If you use the option to emit group data as roles, only groups will appear in the role claim. Any application roles that the user is assigned to won't appear in the role claim.
137
138
138
139
#### Group filtering
139
-
Group filtering allows for fine control of the list of groups that's included as part of the group claim. When a filter is configured, only groups that match the filter will be included in the group's claim that's sent to that application. The filter will be applied against all groups regardless of the group hierarchy.
140
+
Group filtering allows for fine control of the list of groups that's included as part of the group claim. When a filter is configured, only groups that match the filter will be included in the group's claim that's sent to that application. The filter will be applied against all groups regardless of the group hierarchy.
141
+
142
+
> [!NOTE]
143
+
> Group filtering applies to tokens emitted for apps where group claims and filtering was configured in the **Enterprise apps** blade in the portal.
140
144
141
145
You can configure filters to be applied to the group's display name or `SAMAccountName` attribute. The following filtering operations are supported:
0 commit comments