How to Remove First and Last Name Claims from SAML Responses in FusionAuth
-
We need to remove the firstname and lastname claims from the SAML response FusionAuth sends back to one of our applications. How can we do this?
-
You can remove claims from the SAML response using a SAML v2 populate lambda. For example:
samlResponse.assertion.attributes['firstName'] = null; samlResponse.assertion.attributes['lastName'] = null;
Attach this lambda to your SAML Identity Provider configuration for that application.
Documentation: SAMLv2 Response Populate Lambda
-