Hi @Avinash Banjan , have you seen this thread's answer? Please let me know if that works or points you in the right direction. Let me know if not and I can help you further.
Best,
James
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
I'm trying to create custom SAML claims mapping using ExtractMailPrefix() and Join() with seperator (-), but it doesn't seem to work, Can someone pls help or can point me to some examples which are using Join() transformation (graph api)
trying to extract userpricipalname prefix and join with the role
userprincipalname: username@test .com
role: cloudadmin
e.g: expected output: username-cloudadmin
"{\"ClaimsMappingPolicy\":{\"Version\":1,\"IncludeBasicClaimSet\":\"false\",\"ClaimsSchema\":[{\"Source\":\"user\",\"ID\":\"userprincipalname\"},{\"Source\":\"user\",\"ID\":\"assignedroles\",\"SamlClaimType\": \"roles\"},{\"Source\":\"user\",\"ID\":\"displayname\",\"SamlClaimType\": \"name\"},{\"Source\":\"user\",\"ID\":\"mail\",\"SamlClaimType\": \"email\"},{\"Source\":\"transformation\",\"ID\":\"ExtractPrefix\",\"TransformationId\":\"ExtractThePrefix\",\"SamlClaimType\":\"username_prefix\"},{\"Source\":\"transformation\",\"ID\":\"JoinPrefix\",\"TransformationId\":\"JoinThePrefix\",\"SamlClaimType\":\"joined_prefix\"}],\"ClaimsTransformations\":[{\"ID\":\"ExtractThePrefix\",\"TransformationMethod\":\"ExtractMailPrefix\",\"InputClaims\":[{\"ClaimTypeReferenceId\":\"userprincipalname\",\"TransformationClaimType\":\"mail\"}],\"OutputClaims\":[{\"ClaimTypeReferenceId\":\"ExtractPrefix\",\"TransformationClaimType\":\"outputClaim\"}]},{\"ID\":\"JoinThePrefix\",\"TransformationMethod\":\"Join\",\"InputClaims\":[{\"ClaimTypeReferenceId\":\"userprincipalname\",\"TransformationClaimType\":\"mail\"},{\"ClaimTypeReferenceId\":\"assignedroles\",\"TransformationClaimType\":\"mail\"}],\"InputParameters\": [{\"ID\":\"separator\",\"Value\":\"-\"}],\"OutputClaims\":[{\"ClaimTypeReferenceId\":\"JoinPrefix\",\"TransformationClaimType\":\"outputClaim\"}]}]}}"
Help Appreciated !
Hi @Avinash Banjan , have you seen this thread's answer? Please let me know if that works or points you in the right direction. Let me know if not and I can help you further.
Best,
James
Hi @Avinash Banjan ,
Following transformation should work for you.
"{\"ClaimsMappingPolicy\":{\"Version\":1,\"IncludeBasicClaimSet\":\"false\",\"ClaimsSchema\":[{\"Source\":\"user\",\"ID\":\"userprincipalname\"},{\"Source\":\"user\",\"ID\":\"mail\"},{\"Source\":\"transformation\",\"ID\":\"DataJoin\",\"SamlClaimType\":\"new_username\",\"transformationId\":\"ExtractThePrefix\"}],\"ClaimsTransformations\":[{\"ID\":\"ExtractThePrefix\",\"TransformationMethod\":\"ExtractMailPrefix\",\"InputClaims\":[{\"ClaimTypeReferenceId\":\"userprincipalname\",\"TransformationClaimType\":\"mail\"}],\"OutputClaims\":[{\"TransformationClaimType\":\"outputClaim\",\"NextTransform\":\"JoinTheMail\"}]},{\"ID\":\"JoinTheMail\",\"TransformationMethod\":\"Join\",\"InputParameters\":[{\"ID\":\"string2\",\"Value\":\"787.test.com\"},{\"ID\":\"separator\",\"Value\":\"@\"}],\"OutputClaims\":[{\"ClaimTypeReferenceId\":\"DataJoin\",\"TransformationClaimType\":\"outputClaim\"}]}]}}"
Thanks.