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

No examples for ClaimsTransformations #816

Closed
nik-lazer opened this issue May 15, 2024 · 2 comments
Closed

No examples for ClaimsTransformations #816

nik-lazer opened this issue May 15, 2024 · 2 comments

Comments

@nik-lazer
Copy link

nik-lazer commented May 15, 2024

I am working on customizing my claim tokens and need to apply ifEmpty function for that. The description says that I need to provide one input parameter and two output parameters:
Outputs an attribute or constant if the input is null or empty. For example, if you want to output an attribute stored in an extension attribute if the employee ID for a given user is empty. To perform this function, configure the following values: Parameter 1(input): user.employeeid Parameter 2 (output): user.extensionattribute1 Parameter 3 (output if there's no match): user.employeeid

I tried the following:
{ "ClaimsMappingPolicy": { "Version": 1, "IncludeBasicClaimSet": "true", "ClaimsSchema": [ { "Source": "application", "ID": "objectid", "JwtClaimType": "prn1" }, { "Source": "user", "ID": "userprincipalname", "JwtClaimType": "prn2" }, { "Source": "transformation", "TransformationID": "userOrApp", "ID": "collibrasub", "JwtClaimType": "prn" }, { "Source": "user", "ID": "usertype", "JwtClaimType": "prn31" }, { "Source": "application", "ID": "displayname", "JwtClaimType": "prn41" } ], "ClaimsTransformations": [ { "ID": "userOrApp", "TransformationMethod": "IfEmpty", "InputClaims": [ { "ClaimTypeReferenceId": "userprincipalname", "TransformationClaimType": "inputClaim1" }, { "ClaimTypeReferenceId": "objectid", "TransformationClaimType": "inputClaim2" }, { "ClaimTypeReferenceId": "usertype", "TransformationClaimType": "inputClaim3" } ], "OutputClaims": [ { "ClaimTypeReferenceId": "collibrasub", "TransformationClaimType": "outputClaim" } ] } ] } }

but I cannot figure out how the JSON definition has to be written to do it properly. Could you please give more details?


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

@PesalaPavan
Copy link
Contributor

@nik-lazer
Thanks for your feedback! We will investigate and update as appropriate.

@AjayBathini-MSFT
Copy link
Contributor

@nik-lazer

Thank you for your feedback!
I'd recommend working closer with our support team via an [Azure support request] (https://docs.microsoft.com/en-us/azure/azure-portal/supportability/how-to-create-azure-support-request). Or you can leverage our Q&A forum by posting your issue there so our community, and MVPs can further assist you in troubleshooting this issue or finding potential workarounds.
[Teams Q&A forum] (https://docs.microsoft.com/en-us/answers/topics/46488/office-teams-windows-itpro.html) for technical questions about the configuration and administration of Microsoft Teams on Windows.
[Microsoft Teams Community forum] (https://answers.microsoft.com/en-us/msteams/forum?sort=LastReplyDate&dir=Desc&tab=All&status=all&mod=&modAge=&advFil=&postedAfter=&postedBefore=&threadType=All&isFilterExpanded=false&page=1)
Thank you for your time and patience throughout this issue.

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

No branches or pull requests

3 participants