AWS SSO with action and not rules

There is only a tutorial how to implement it with rules: Configure Amazon Web Services for Single Sign-On

How can It be done with actions? What do I replace with

user.awsRole

?

Hello @justasdautaras,

Welcome to the Auth0 community!

In order to migrate that rule to an action you can replace user.awsRole with api.samlResponse.setAttribute.

Here is an example on how to do that:

exports.onExecutePostLogin = async (event, api) => {
  api.samlResponse.setAttribute("https://aws.amazon.com/SAML/Attributes/Role", "{yourArn}");
  api.samlResponse.setAttribute("https://aws.amazon.com/SAML/Attributes/RoleSessionName", event.user.name);
};

I hope this was helpful in solving your problem and if you have additional questions please come back to the community.

Thanks,
Tudor

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.