User Metadata not showing up in SAML2 Web App Response

Hi @OliJ,

Welcome to the Auth0 Community!

Since the SAML2 Addon mappings object can only work with root-level profile attributes, you will need to map the user_metadata properties to the event.user object using an Action.

Doing this will bubble up the attributes to the root level and allow them to be accessible from the mappings objects in the SAML2 Addon settings for login.

Post-Login Action script:

exports.onExecutePostLogin = async (event, api) => {
   if (event.user.user_metadata && event.user.user_metadata.UserMeta) {
     event.user.UserMeta = event.user.user_metadata.UserMeta;
   }
}

(Reference: How to Map SAML Attributes when Auth0 is the IDP in the SAML2 Addon)

Could you give this a try and let me know how it goes for you?

Thanks,
Rueben