Skip to main content
November 22, 2024
Question

SAML Dynamic Attribute Mapping

  • November 22, 2024
  • 7 replies
  • 0 views

Hi,

We have configured SAML login in our environment but we are having trouble mapping the email attribute. Our client has two types of SAML users:

  • internal who have their email defined in the email claim.
  • external who do not have any value defined in the email claim, is empty when accessing Appian, and have their email in the name claim.

We are trying to find a way to make this mapping dynamic so it can work for both type of users with the same Idp. We need a way to validate if the email claim is empty and map the name claim instead, is this possible?

We haven't found any way to do this but we wanted to ask in case anyone knows or has any ideas that we can try.

Thanks in advance

7 replies

davidj137213
November 22, 2024

Could'nt be possible map that value in another way?  I mean, apply that logic on the client side.,

November 25, 2024

We are trying to figure out if we can do this directly in Appian as it will be the easiest and quickest for us while we review this issue with the IDP.

stefanhelzle0001
November 22, 2024

Did you consider to create two separate configurations to the same IDP but with different mappings? When putting the two user groups into different Appian groups you can make them automatically use their respective login.

November 25, 2024

I have tried this already but Appian doesn't allow to use the same Idp metadata file in two different confgurations. I get this error "Another identity provider already exists with the same entity ID provided in this metadata file. Entity IDs must be unique."

stefanhelzle0001
November 25, 2024

Sure, you will need two of these.

naveenkumarr7411
November 23, 2024

 [mention:dc9b42daf27c4a1da72f543d4747af57:e9ed411860ed4f2ba0265705b8793d05]  and [mention:a11f77a729fb4db2af76b09948583328:e9ed411860ed4f2ba0265705b8793d05] 

Stefan’s suggestion about creating separate configurations is a great starting point! If that’s not feasible, here are a couple of other ideas:

  1. Rule-Based Mapping at the IdP:
    If your IdP supports conditional logic, you could configure it to check if the email claim is empty. If so, fallback to using the name claim for the email attribute before sending it to Appian.

  2. Middleware Preprocessing:
    If you have a middleware layer between the IdP and Appian, it could inspect the SAML assertion and adjust the claims dynamically (e.g., map name to email when the email claim is empty).

November 25, 2024

[mention:845bdda7f0db42be805e5a424906729d:e9ed411860ed4f2ba0265705b8793d05] 

We don't have a middleware layer between the IDP and Appian, so the second option wouldn't be valid for us. I'll check with my team and the IDP to see if we can get two metadata files for the configuration, as Stefan mentioned, or apply the logic you mention in the IDP itself.
Thank you!