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/app-provisioning/customize-application-attributes.md
+9-10Lines changed: 9 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ ms.service: active-directory
8
8
ms.subservice: app-provisioning
9
9
ms.workload: identity
10
10
ms.topic: tutorial
11
-
ms.date: 03/23/2023
11
+
ms.date: 03/24/2023
12
12
ms.author: kenwith
13
13
ms.reviewer: arvinh
14
14
---
@@ -58,22 +58,21 @@ There are four different mapping types supported:
58
58
59
59
-**Direct** – the target attribute is populated with the value of an attribute of the linked object in Azure AD.
60
60
-**Constant** – the target attribute is populated with a specific string you specified.
61
-
-**Expression** - the target attribute is populated based on the result of a script-like expression.
62
-
For more information, see [Writing Expressions for Attribute-Mappings in Azure Active Directory](../app-provisioning/functions-for-customizing-application-data.md).
61
+
-**Expression** - the target attribute is populated based on the result of a script-like expression. For more information about expressions, see [Writing Expressions for Attribute-Mappings in Azure Active Directory](../app-provisioning/functions-for-customizing-application-data.md).
63
62
-**None** - the target attribute is left unmodified. However, if the target attribute is ever empty, it's populated with the Default value that you specify.
64
63
65
64
Along with these four basic types, custom attribute-mappings support the concept of an optional **default** value assignment. The default value assignment ensures that a target attribute is populated with a value if there's not a value in Azure AD or on the target object. The most common configuration is to leave this blank.
66
65
67
66
### Understanding attribute-mapping properties
68
67
69
-
In the previous section, you were already introduced to the attribute-mapping type property.
70
-
Along with this property, attribute-mappings also support the following attributes:
68
+
In the previous section, you were introduced to the attribute-mapping type property.
69
+
Along with this property, attribute-mappings also supports the attributes:
71
70
72
71
-**Source attribute** - The user attribute from the source system (example: Azure Active Directory).
73
72
-**Target attribute** – The user attribute in the target system (example: ServiceNow).
74
-
-**Default value if null (optional)** - The value that is passed to the target system if the source attribute is null. This value is only provisioned when a user is created. The "default value when null" won't be provisioned when updating an existing user. If for example, you provision all existing users in the target system with a particular Job Title (when it's null in the source system), you'll use the following [expression](../app-provisioning/functions-for-customizing-application-data.md): Switch(IsPresent([jobTitle]), "DefaultValue", "True", [jobTitle]). Make sure to replace the "Default Value" with the value to provision when null in the source system.
73
+
-**Default value if null (optional)** - The value that is passed to the target system if the source attribute is null. This value is only provisioned when a user is created. The "default value when null" isn't provisioned when updating an existing user. For example, add a default value for job title, when creating a user, with the expression: `Switch(IsPresent([jobTitle]), "DefaultValue", "True", [jobTitle])`. For more information about expressions, see [Reference for writing expressions for attribute mappings in Azure Active Directory](../app-provisioning/functions-for-customizing-application-data.md).
75
74
-**Match objects using this attribute** – Whether this mapping should be used to uniquely identify users between the source and target systems. It's typically set on the userPrincipalName or mail attribute in Azure AD, which is typically mapped to a username field in a target application.
76
-
-**Matching precedence** – Multiple matching attributes can be set. When there are multiple, they're evaluated in the order defined by this field. As soon as a match is found, no further matching attributes are evaluated. While you can set as many matching attributes as you would like, consider whether the attributes you're using as matching attributes are truly unique and need to be matching attributes. Generally customers have 1 or 2 matching attributes in their configuration.
75
+
-**Matching precedence** – Multiple matching attributes can be set. When there are multiple, they're evaluated in the order defined by this field. As soon as a match is found, no further matching attributes are evaluated. While you can set as many matching attributes as you would like, consider whether the attributes you're using as matching attributes are truly unique and need to be matching attributes. Generally customers have one or two matching attributes in their configuration.
77
76
-**Apply this mapping**
78
77
-**Always** – Apply this mapping on both user creation and update actions.
79
78
-**Only during creation** - Apply this mapping only on user creation actions.
@@ -113,7 +112,7 @@ Applications and systems that support customization of the attribute list includ
113
112
- ServiceNow
114
113
- Workday to Active Directory / Workday to Azure Active Directory
115
114
- SuccessFactors to Active Directory / SuccessFactors to Azure Active Directory
116
-
- Azure Active Directory ([Azure AD Graph API default attributes](/previous-versions/azure/ad/graph/api/entity-and-complex-type-reference#user-entity) and custom directory extensions are supported). Learn more about [creating extensions](./user-provisioning-sync-attributes-for-mapping.md) and [known limitations](./known-issues.md).
115
+
- Azure Active Directory ([Azure AD Graph API default attributes](/previous-versions/azure/ad/graph/api/entity-and-complex-type-reference#user-entity) and custom directory extensions are supported). For more information about creating extensions, see [Syncing extension attributes for Azure Active Directory Application Provisioning](./user-provisioning-sync-attributes-for-mapping.md) and [Known issues for provisioning in Azure Active Directory](./known-issues.md).
117
116
- Apps that support [SCIM 2.0](https://tools.ietf.org/html/rfc7643)
118
117
- For Azure Active Directory writeback to Workday or SuccessFactors, it's supported to update relevant metadata for supported attributes (XPATH and JSONPath), but isn't supported to add new Workday or SuccessFactors attributes beyond those included in the default schema
119
118
@@ -197,7 +196,7 @@ Custom attributes can't be referential attributes, multi-value or complex-typed
197
196
198
197
199
198
## Provisioning a role to a SCIM app
200
-
Use the steps below to provision roles for a user to your application. Note that the description below is specific to custom SCIM applications. For gallery applications such as Salesforce and ServiceNow, use the pre-defined role mappings. The bullets below describe how to transform the AppRoleAssignments attribute to the format your application expects.
199
+
Use the steps below to provision roles for a user to your application. Note that the description below is specific to custom SCIM applications. For gallery applications such as Salesforce and ServiceNow, use the predefined role mappings. The bullets below describe how to transform the AppRoleAssignments attribute to the format your application expects.
201
200
202
201
- Mapping an appRoleAssignment in Azure AD to a role in your application requires that you transform the attribute using an [expression](../app-provisioning/functions-for-customizing-application-data.md). The appRoleAssignment attribute **shouldn't be mapped directly** to a role attribute without using an expression to parse the role details.
203
202
@@ -338,7 +337,7 @@ Selecting this option will effectively force a resynchronization of all users wh
338
337
- The attribute IsSoftDeleted is often part of the default mappings for an application. IsSoftdeleted can be true in one of four scenarios (the user is out of scope due to being unassigned from the application, the user is out of scope due to not meeting a scoping filter, the user has been soft deleted in Azure AD, or the property AccountEnabled is set to false on the user). It's not recommended to remove the IsSoftDeleted attribute from your attribute mappings.
339
338
- The Azure AD provisioning service doesn't support provisioning null values.
340
339
- They primary key, typically "ID", shouldn't be included as a target attribute in your attribute mappings.
341
-
- The role attribute typically needs to be mapped using an expression, rather than a direct mapping. See section above for more details on role mapping.
340
+
- The role attribute typically needs to be mapped using an expression, rather than a direct mapping. For more information about role mapping, see [Provisioning a role to a SCIM app](#Provisioning a role to a SCIM app).
342
341
- While you can disable groups from your mappings, disabling users isn't supported.
Copy file name to clipboardExpand all lines: articles/active-directory/conditional-access/concept-token-protection.md
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: Learn how to use token protection in Conditional Access policies.
4
4
ms.service: active-directory
5
5
ms.subservice: conditional-access
6
6
ms.topic: conceptual
7
-
ms.date: 03/09/2023
7
+
ms.date: 03/24/2023
8
8
9
9
ms.author: joflore
10
10
author: MicrosoftGuyJFlo
@@ -22,7 +22,10 @@ Token protection creates a cryptographically secure tie between the token and th
22
22
> [!IMPORTANT]
23
23
> Token protection is currently in public preview. For more information about previews, see [Supplemental Terms of Use for Microsoft Azure Previews](https://azure.microsoft.com/support/legal/preview-supplemental-terms/).
24
24
25
-
With this preview, we're giving you the ability to create a Conditional Access policy to require token protection for sign-in tokens for specific services. We support token protection for sign-in tokens in Conditional Access for desktop applications accessing Exchange Online and SharePoint Online on Windows devices.
25
+
With this preview, we're giving you the ability to create a Conditional Access policy to require token protection for sign-in tokens (refresh tokens) for specific services. We support token protection for sign-in tokens in Conditional Access for desktop applications accessing Exchange Online and SharePoint Online on Windows devices.
26
+
27
+
> [!NOTE]
28
+
> We may interchange sign in tokens and refresh tokens in this content. This preview doesn't currently support access tokens or web cookies.
26
29
27
30
:::image type="content" source="media/concept-token-protection/complete-policy-components-session.png" alt-text="Screenshot showing a Conditional Access policy requiring token protection as the session control":::
Copy file name to clipboardExpand all lines: articles/active-directory/develop/access-tokens.md
+15-26Lines changed: 15 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -242,45 +242,34 @@ If the application has custom signing keys as a result of using the [claims-mapp
242
242
243
243
### Claims based authorization
244
244
245
-
The business logic of the application dictates claims based authorization. Some common authorization methods are listed below.
245
+
The business logic of an application determines how authorization should be handled. The general approach to authorization based on token claims, and which claims should be used, is described below.
246
246
247
-
#### Validate the token
247
+
After a token is validated with the correct `aud` claim, the token tenant, subject, actor must be authorized.
248
248
249
-
Use the `aud` claim to ensure that the user intended to call the application. If the identifier of the resource isn't in the `aud` claim, reject it.
249
+
#### Tenant
250
250
251
-
#### Validate user permission
251
+
First, always check that the `tid` in a token matches the tenant ID used to store data with the application. When information is stored for an application in the context of a tenant, it should only be accessed again later in the same tenant. Never allow data in one tenant to be accessed from another tenant.
252
252
253
-
Use the `roles` and `wids` claims to validate that the user has authorization to call the API. For example, an administrator may have permission to write to the API, but not a normal user. Check that the `tid` inside the token matches the tenant ID used to store the data in the API.
253
+
#### Subject
254
254
255
-
When a user stores data in the API from one tenant, they must sign into that tenant again to access that data. Never allow data in one tenant to be accessed from another tenant.
255
+
Next, to determine if the token subject, such as the user (or app itself in the case of an app-only token), is authorized, either check for specific `sub` or `oid` claims, or check that the subject belongs to an appropriate role or group with the `roles`, `groups`, `wids` claims.
256
256
257
-
Use the `amr` claim to verify the user has performed MFA. The enforcement of MFA is done using [Conditional Access](../conditional-access/overview.md). If `roles` or `groups` claims are requested in the access token, verify that the user is in the group allowed to do this action.
257
+
For example, use the immutable claim values `tid` and `oid` as a combined key for application data and determining whether a user should be granted access.
258
258
259
-
For tokens retrieved using the implicit flow, query the [Microsoft Graph](https://developer.microsoft.com/graph/) for this data, as it's often too large to fit in the token.
259
+
The `roles`, `groups` or `wids` claims can also be used to determine if the subject has authorization to perform an operation. For example, an administrator may have permission to write to an API, but not a normal user, or the user may be in a group allowed to do some action.
260
260
261
-
Don't use `email` or `upn` claim values to determine whether the user in an access token should have access to data. Mutable claim values like these can change over time, making them insecure and unreliable for authorization.
261
+
> [!WARNING]
262
+
> Never use `email` or `upn` claim values to store or determine whether the user in an access token should have access to data. Mutable claim values like these can change over time, making them insecure and unreliable for authorization.
262
263
263
-
Use immutable claim values `tid` and `sub` or `oid` as a combined key for uniquely identifying the API's data and determining whether a user should be granted access to that data.
264
+
#### Actor
264
265
265
-
- Good: `tid` + `sub`
266
-
- Better: `tid` + `oid` - the `oid` is consistent across applications, so an ecosystem of applications can audit user access to data.
266
+
Lastly, when an app is acting for a user, this client app (the actor), must also be authorized. Use the `scp` claim (scope) to validate that the app has permission to perform an operation.
267
267
268
-
Don't use mutable, human-readable identifiers like `email` or `upn` for uniquely identifying data.
268
+
Scopes are defined by the application, and the absence of `scp` claim means full actor permissions.
269
269
270
-
#### Validate application sign-in
271
-
272
-
* Use the `scp` claim to validate that the user has granted the calling app permission to call your API.
273
-
* Ensure the calling client is allowed to call your API using the `appid` claim (for v1.0 tokens) or the `azp` claim (for v2.0 tokens).
274
-
* You only need to validate these claims (`appid`, `azp`) if you want to restrict your web API to be called only by pre-determined applications (e.g., line-of-business applications or web APIs called by well-known frontends). APIs intended to allow access from any calling application do not need to validate these claims.
275
-
276
-
## User and application tokens
277
-
278
-
An application may receive tokens for a user or directly from an application through the client credentials flow. These app-only tokens indicate that this call is coming from an application and doesn't have a user backing it. These tokens are handled largely the same:
279
-
280
-
- Use `roles` to see permissions that have been granted to the subject of the token.
281
-
- Use `oid` or `sub` to validate that the calling service principal is the expected one.
270
+
> [!NOTE]
271
+
> An application may handle app-only tokens (requests from applications without users, such as daemon apps) and want to authorize a specific application across multiple tenants, rather than individual service principal IDs. In that case, check for an app-only token using the `idtyp` optional claim and use the `appid` claim (for v1.0 tokens) or the `azp` claim (for v2.0 tokens) along with `tid` to determine authorization based on tenant and application ID.
282
272
283
-
If the application needs to distinguish between app-only access tokens and access tokens for users, use the `idtyp`[optional claim](active-directory-optional-claims.md). To detect app-only access tokens, add the `idtyp` claim to the `accessToken` field, and check for the value `app`. ID tokens and access tokens for users won't have the `idtyp` claim included.
0 commit comments