Skip to content

Navigation Menu

Sign in
Sign up

Doc inconsistency for CompareClaimToValue transform #4

Open

Description

in unit-tests/claims-transformation/string/CT_CompareClaimToValue.xml

the CT "CheckStrings-Equal" doesn't conform to the documentation..

https://docs.microsoft.com/en-us/azure/active-directory-b2c/string-transformations#compareclaimtovalue

the input parameter 'ignoreCase' is documented as being DataType "boolean" but if you use boolean, you get an error similar to

"Message": "Execution of ClaimsTransformationImpl of Type "Microsoft.Cpim.Data.Transformations.EqualityTransformation" for TransformationMethod "CompareClaimToValue" of ClaimsTransformation with id "xxxxxxx" in policy "B2C_1A_P1_V1_SuSi_UAT" of tenant "xxxxxxxx.onmicrosoft.com" threw an exception with the following message: Unable to cast object of type 'System.Boolean' to type 'System.String'.",

 <ClaimsTransformation Id="CheckStrings-Equal" TransformationMethod="CompareClaimToValue">
 <InputClaims>
 <InputClaim ClaimTypeReferenceId="inputString" TransformationClaimType="inputClaim1" />
 </InputClaims>
 <InputParameters>
 <InputParameter Id="compareTo" DataType="string" Value="ABC" />
 <InputParameter Id="operator" DataType="string" Value="equal" />
 <InputParameter Id="ignoreCase" DataType="string" Value="true" />
 </InputParameters>
 <OutputClaims>
 <OutputClaim ClaimTypeReferenceId="result" TransformationClaimType="outputClaim" />
 </OutputClaims>
 </ClaimsTransformation>

So the code sample is correct, but the docs are incorrect on this point..

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      AltStyle によって変換されたページ (->オリジナル) /