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
This article provides examples for using the boolean claims transformations of the Identity Experience Framework schema in Azure Active Directory B2C (Azure AD B2C). For more information, see [ClaimsTransformations](claimstransformations.md).
19
+
This article provides examples for using the boolean claims transformations of the Identity Experience Framework schema in Azure Active Directory B2C (Azure AD B2C). For more information, see [claims transformations](claimstransformations.md).
22
20
23
21
## AndClaims
24
22
25
-
Performs an And operation of two boolean inputClaims and sets the outputClaim with result of the operation.
23
+
Computes an `And` operation of two boolean input claims, and sets the output claim with result of the operation.
26
24
27
-
|Item| TransformationClaimType | Data Type | Notes |
25
+
|Element| TransformationClaimType | Data Type | Notes |
| InputClaim | inputClaim1 | boolean | The first ClaimType to evaluate. |
30
-
| InputClaim | inputClaim2 | boolean | The second ClaimType to evaluate. |
31
-
|OutputClaim | outputClaim | boolean | The ClaimTypes that will be produced after this claims transformation has been invoked (true or false). |
27
+
| InputClaim | inputClaim1 | boolean | The first claim to evaluate. |
28
+
| InputClaim | inputClaim2 | boolean | The second claim to evaluate. |
29
+
|OutputClaim | outputClaim | boolean | The claim that will be produced after this claims transformation has been invoked (true or false). |
30
+
32
31
33
-
The following claims transformation demonstrates how to And two boolean ClaimTypes: `isEmailNotExist`, and `isSocialAccount`. The output claim `presentEmailSelfAsserted` is set to `true` if the value of both input claims are `true`. In an orchestration step, you can use a precondition to preset a self-asserted page, only if a social account email is empty.
32
+
### Example of AndClaims
33
+
34
+
The following claims transformation demonstrates how to `And` two boolean claims: `isEmailNotExist`, and `isSocialAccount`. The output claim `presentEmailSelfAsserted` is set to `true` if the values of both input claims are `true`.
| inputClaim | inputClaim | boolean | The ClaimType to be asserted. |
61
+
| inputClaim | inputClaim | boolean | The claim to be checked. |
63
62
| InputParameter |valueToCompareTo | boolean | The value to compare (true or false). |
64
63
65
64
The **AssertBooleanClaimIsEqualToValue** claims transformation is always executed from a [validation technical profile](validation-technical-profile.md) that is called by a [self-asserted technical profile](self-asserted-technical-profile.md). The **UserMessageIfClaimsTransformationBooleanValueIsNotEqual** self-asserted technical profile metadata controls the error message that the technical profile presents to the user. The error messages can be [localized](localization-string-ids.md#claims-transformations-error-messages).
The following claims transformation demonstrates how to check the value of a boolean ClaimType with a `true` value. If the value of the `accountEnabled` ClaimType is false, an error message is thrown.
68
+
### Example of AssertBooleanClaimIsEqualToValue
69
+
70
+
The following claims transformation demonstrates how to check the value of a boolean claim with a `true` value. If the value of the `accountEnabled` claim is false, an error message is thrown.
| InputClaim | inputClaim | boolean | The ClaimType to be asserted. |
129
+
| InputClaim | inputClaim | boolean | The claim to be compared. |
121
130
| InputParameter |valueToCompareTo | boolean | The value to compare (true or false). |
122
-
| OutputClaim | compareResult | boolean | The ClaimType that is produced after this ClaimsTransformation has been invoked. |
131
+
| OutputClaim | compareResult | boolean | The claim that is produced after this claims transformation has been invoked. |
132
+
133
+
### Example of CompareBooleanClaimToValue
123
134
124
-
The following claims transformation demonstrates how to check the value of a boolean ClaimType with a `true` value. If the value of the `IsAgeOver21Years`ClaimType is equal to `true`, the claims transformation returns `true`, otherwise `false`.
135
+
The following claims transformation demonstrates how to check the value of a boolean claim with a `true` value. If the value of the `IsAgeOver21Years`claim is equal to `true`, the claims transformation returns `true`, otherwise `false`.
| InputClaim | inputClaim1 | boolean | The first ClaimType to evaluate. |
185
-
| InputClaim | inputClaim2 | boolean | The second ClaimType to evaluate. |
186
-
| OutputClaim | outputClaim | boolean | The ClaimTypes that will be produced after this ClaimsTransformation has been invoked (true or false). |
193
+
| InputClaim | inputClaim1 | boolean | The first claim to evaluate. |
194
+
| InputClaim | inputClaim2 | boolean | The second claim to evaluate. |
195
+
| OutputClaim | outputClaim | boolean | The claim that will be produced after this claims transformation has been invoked (true or false). |
196
+
197
+
### Example of OrClaims
187
198
188
-
The following claims transformation demonstrates how to `Or` two boolean ClaimTypes. In the orchestration step, you can use a precondition to preset a self-asserted page, if the value of one of the claims is `true`.
199
+
The following claims transformation demonstrates how to `Or` two boolean claims.
@@ -199,10 +210,12 @@ The following claims transformation demonstrates how to `Or` two boolean ClaimTy
199
210
</ClaimsTransformation>
200
211
```
201
212
202
-
### Example of OrClaims
203
-
204
213
- Input claims:
205
-
-**inputClaim1**: true
206
-
-**inputClaim2**: false
214
+
-**inputClaim1**: true
215
+
-**inputClaim2**: false
207
216
- Output claims:
208
-
-**outputClaim**: true
217
+
-**outputClaim**: true
218
+
219
+
## Next steps
220
+
221
+
- Find more [claims transformation samples](https://github.com/azure-ad-b2c/unit-tests/tree/main/claims-transformation) on the Azure AD B2C community GitHub repo
Copy file name to clipboardExpand all lines: articles/active-directory-b2c/claims-transformation-technical-profile.md
+7-6Lines changed: 7 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,15 @@
1
1
---
2
-
title: Define a Claims transformation technical profile
2
+
title: Define a claims transformation technical profile
3
3
titleSuffix: Azure AD B2C
4
-
description: Define a Claims transformation technical profile in a custom policy in Azure Active Directory B2C.
4
+
description: Define a claims transformation technical profile in a custom policy in Azure Active Directory B2C.
5
5
services: active-directory-b2c
6
6
author: kengaderdus
7
7
manager: CelesteDG
8
8
9
9
ms.service: active-directory
10
10
ms.workload: identity
11
11
ms.topic: reference
12
-
ms.date: 02/13/2020
12
+
ms.date: 01/17/2022
13
13
ms.author: kengaderdus
14
14
ms.subservice: B2C
15
15
---
@@ -35,7 +35,7 @@ The following example shows a claims transformation technical profile:
35
35
36
36
## Output claims
37
37
38
-
The **OutputClaims** element is mandatory. You should provide at least one output claim returned by the technical profile. The following example shows how to set default values in the output claims:
38
+
The **OutputClaims** element is mandatory. Provide at least one output claim returned by the technical profile. The following example shows how to set default values in the output claims:
The claims transformation technical profile enables you to execute a claims transformation from any user journey's orchestration step. In the following example, the orchestration step calls one of the unlink technical profiles, such as **UnLink-Facebook-OAUTH**. This technical profile calls the claims transformation technical profile **RemoveAlternativeSecurityIdByIdentityProvider**, which generates a new **AlternativeSecurityIds2** claim that contains the list of user social identities, while removing the Facebook identity from the collections.
81
+
The claims transformation technical profile enables you to execute a claims transformation from any user journey's orchestration step. In the following example, the orchestration step calls one of the unlink technical profiles, such as **UnLink-Facebook-OAUTH**. This technical profile calls the output claims transformation **RemoveAlternativeSecurityIdByIdentityProvider**, which generates a new **AlternativeSecurityIds2** claim. The output claim contains the list of user's social identities, while removing the Facebook identity from the collections.
82
82
83
83
```xml
84
84
<UserJourneyId="AccountUnLink">
@@ -100,7 +100,8 @@ The claims transformation technical profile enables you to execute a claims tran
100
100
101
101
| Attribute | Required | Description |
102
102
| --------- | -------- | ----------- |
103
-
| IncludeClaimResolvingInClaimsHandling | No | For input and output claims, specifies whether [claims resolution](claim-resolver-overview.md) is included in the technical profile. Possible values: `true`, or `false` (default). If you want to use a claims resolver in the technical profile, set this to `true`. |
103
+
| IncludeClaimResolvingInClaimsHandling | No | For input and output claims, specifies whether [claims resolution](claim-resolver-overview.md) is included in the technical profile. Possible values: `true`, or `false` (default). If you want to use a claims resolver in the technical profile, set this metadata to `true`. |
104
+
| ContentDefinitionReferenceId | No | The identifier of the [content definition](contentdefinitions.md) associated with this technical profile. The content definition metadata is required for [FormatLocalizedString](string-transformations.md#formatlocalizedstring), [GetLocalizedStringsTransformation](string-transformations.md#getlocalizedstringstransformation), and [GetMappedValueFromLocalizedCollection](string-transformations.md#getmappedvaluefromlocalizedcollection) claims transformations.|
0 commit comments