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-b2c/string-transformations.md
+112-1Lines changed: 112 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ manager: celestedg
9
9
ms.service: active-directory
10
10
ms.workload: identity
11
11
ms.topic: reference
12
-
ms.date: 02/03/2020
12
+
ms.date: 02/04/2020
13
13
ms.author: marsma
14
14
ms.subservice: B2C
15
15
---
@@ -495,6 +495,47 @@ Use this claims transformation to parse the domain name after the @ symbol of th
495
495
- Output claims:
496
496
-**domain**: outlook.com
497
497
498
+
## SetClaimsIfRegexMatch
499
+
500
+
Checks that a string claim `claimToMatch` and `matchTo` input parameter are equal, and sets the output claims with the value present in `outputClaimIfMatched` input parameter, along with compare result output claim, which is to be set as `true` or `false` based on the result of comparison.
501
+
502
+
| Item | TransformationClaimType | Data Type | Notes |
| inputClaim | claimToMatch | string | The claim type, which is to be compared. |
505
+
| InputParameter | matchTo | string | The regular expression to match. |
506
+
| InputParameter | outputClaimIfMatched | string | The value to be set if strings are equal. |
507
+
| OutputClaim | outputClaim | string | If regular expression is match, this output claim contains the value of `outputClaimIfMatched` input parameter. Or null, if no match. |
508
+
| OutputClaim | regexCompareResultClaim | boolean | The regular expression match result output claim type, which is to be set as `true` or `false` based on the result of matching. |
509
+
510
+
For example, checks whether the provided phone number is valid, based on phone number regular expression pattern.
Checks that a string claim and `matchTo` input parameter are equal, and sets the output claims with the value present in `stringMatchMsg` and `stringMatchMsgCode` input parameters, along with compare result output claim, which is to be set as `true` or `false` based on the result of comparison.
@@ -703,3 +744,73 @@ For example, normalize a phone number, by removing the `-` characters
703
744
- Output claims:
704
745
-**outputClaim**: "+164411452054"
705
746
747
+
## StringJoin
748
+
749
+
Concatenates the elements of a specified string collection claim type, using the specified separator between each element or member.
750
+
751
+
| Item | TransformationClaimType | Data Type | Notes |
| InputClaim | inputClaim | stringCollection | A collection that contains the strings to concatenate. |
754
+
| InputParameter | delimiter | string | The string to use as a separator, such as comma `,`. |
755
+
| OutputClaim | outputClaim | string | A string that consists of the members of the `inputClaim` string collection, delimited by the `delimiter` input parameter. |
756
+
757
+
The following example takes a string collection of user roles, and convert it to a comma delimiter string. You can user this method to store a string collection in Azure AD user account. Later, when you read the account from the directory, use the `StringSplit` to convert the comma delimiter string back to string collection.
| InputClaim | inputClaim | string | A string claim type that contains the sub strings to split. |
790
+
| InputParameter | delimiter | string | The string to use as a separator, such as comma `,`. |
791
+
| OutputClaim | outputClaim | stringCollection | A string collection whose elements contain the substrings in this string that are delimited by the `delimiter` input parameter. |
792
+
793
+
The following example takes a comma delimiter string of user roles, and convert it to a string collection.
0 commit comments