fusionauth-issues icon indicating copy to clipboard operation
fusionauth-issues copied to clipboard

Okta SAML Docs Missing Attribute

Open tomcatling-faculty opened this issue 2 years ago • 2 comments

Okta SAML Walkthrough Missing Email Attribute

Description

While following the Okta/FusionAuth SAML guide here, the login was failing due to the SAML response missing an email attribute.

Adding the following line to the default SAML reconcile Lambda (and enabling that lambda for the integration, which is also not explicitly mentioned) fixed the issue for me:

user.email = defaultIfNull(samlResponse, 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/email', 'email');

tomcatling-faculty avatar Dec 06 '23 16:12 tomcatling-faculty

Thanks @tomcatling-faculty for filing this issue! And I'm glad you got your integration sorted out and working.

I scanned the FusionAuth documentation you linked and noted that it has information about configuring the email to be sent by Okta and received by FusionAuth without using a lambda:

You can also instruct Okta to send over another attribute in the AuthN Response of email. Under the Name field enter email, for Name format leave as Unspecified, and finally for Value enter user.email.

You can tell FusionAuth how to find and use this persistent userId by modifying your newly created SAML IdP Initiated Provider in FusionAuth under the Options tab. Here you will add the value userId to the Unique Id claim field. Additionally, on the same tab, you can instruct FusionAuth where to find the email claim by filling in the Email claim with the value email. Depending on your Okta configuration, you can optionally indicate Use NameID for email instead.

Did those instructions not work for you?

A lambda is a great way of getting information from SAML responses, but is a bit more complex than the configuration above, so I'd rather not change the documentation unless it didn't work.

mooreds avatar Dec 08 '23 15:12 mooreds

@tomcatling-faculty any feedback on this?

mooreds avatar May 22 '24 03:05 mooreds

Closing this issue. Please re-open if you think there is an unaddressed issue here @tomcatling-faculty.

andrewpai avatar Dec 27 '24 04:12 andrewpai