How do I override the issuer (audience claim) in a rule for SAML2

HI,

When i look at the debug window for a SAML2 webapp I notice the issuer is not correct, What is the correct javascript rule syntax to fix this?

I have in my SAML assertion: saml:Issuerurn:not-what-i-expected</saml:Issuer>

And tried:

function (user, context, callback) {

user.awsRole = ‘arn:aws:iam::983623687068:role/auth0-saml-role,arn:aws:iam::983623687068:saml-provider/auth0-saml’;
user.awsRoleSession = user.name ;

context.samlConfiguration.mappings = {

‘urn:MY_AUTH0_DOMAIN.auth0.com’:‘audience’
};

callback(null, user, context);
}

And restested the saml webap debug, but the issuer remains the same

Hey there!

As this topic is related to Rules - Hooks - Actions and Rules & Hooks are being deprecated soon I’m excited to let you know about our next Ask me Anything session in the Forum on Thursday, January 18 with the Rules, Hooks and Actions team on Rules & Hooks and why Actions matter! Submit your questions in the thread above and our esteemed product experts will provide written answers on January 18. Find out more about Rules & Hooks and why Actions matter! Can’t wait to see you there!

Learn more here!