Skip to content

Commit 7c77bcf

Browse files
authored
Update stringcollection-transformations.md
New claim type StringCollectionContainsClaim
1 parent c4a7593 commit 7c77bcf

File tree

1 file changed

+35
-1
lines changed

1 file changed

+35
-1
lines changed

articles/active-directory-b2c/stringcollection-transformations.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ manager: celestedg
99
ms.service: active-directory
1010
ms.workload: identity
1111
ms.topic: reference
12-
ms.date: 02/27/2020
12+
ms.date: 04/21/2020
1313
ms.author: mimart
1414
ms.subservice: B2C
1515
---
@@ -155,4 +155,38 @@ Following example checks whether the `roles` stringCollection claim type contain
155155
- Output claims:
156156
- **outputClaim**: "true"
157157

158+
## StringCollectionContainsClaim
158159

160+
Checks if a StringCollection claim type contains a claim value.
161+
162+
| Item | TransformationClaimType | Data Type | Notes |
163+
| ---- | ----------------------- | --------- | ----- |
164+
| InputClaim | collection | stringCollection | The claim type which is to be searched. |
165+
| InputClaim | item|string| The claim type that contains the value to search.|
166+
|InputParameter|ignoreCase|string|Specifies whether this comparison should ignore the case of the strings being compared.|
167+
| OutputClaim | outputClaim | boolean | The ClaimType that is produced after this ClaimsTransformation has been invoked. A boolean indicator if the collection contains such a string |
168+
169+
Following example checks whether the `roles` stringCollection claim type contains the value of the `role` claim type.
170+
171+
```XML
172+
<ClaimsTransformation Id="HasRequiredRole" TransformationMethod="StringCollectionContainsClaim">
173+
<InputClaims>
174+
<InputClaim ClaimTypeReferenceId="roles" TransformationClaimType="collection" />
175+
<InputClaim ClaimTypeReferenceId="role" TransformationClaimType="item" />
176+
</InputClaims>
177+
<InputParameters>
178+
<InputParameter Id="ignoreCase" DataType="string" Value="true" />
179+
</InputParameters>
180+
<OutputClaims>
181+
<OutputClaim ClaimTypeReferenceId="hasAccess" TransformationClaimType="outputClaim" />
182+
</OutputClaims>
183+
</ClaimsTransformation>
184+
```
185+
186+
- Input claims:
187+
- **collection**: ["reader", "author", "admin"]
188+
- **item**: "Admin"
189+
- Input parameters:
190+
- **ignoreCase**: "true"
191+
- Output claims:
192+
- **outputClaim**: "true"

0 commit comments

Comments
 (0)