Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc inconsistency for CompareClaimToValue transform #4

Open
frankdrewes opened this issue May 18, 2022 · 0 comments
Open

Doc inconsistency for CompareClaimToValue transform #4

frankdrewes opened this issue May 18, 2022 · 0 comments

Comments

@frankdrewes
Copy link

frankdrewes commented May 18, 2022

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..

@frankdrewes frankdrewes changed the title Doc inconsistency for Doc inconsistency for CompareClaimToValue transform May 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant