Skip to content

Okta

Use a SAML 2.0 app integration in Okta. Okta sends only the attribute statements of the app.

The Okta preset fills in these attributes:

Field Attribute
Email Attribute email
First Name Attribute firstName
Last Name Attribute lastName
Group Attribute groups

The import selects this preset when the IdP entity ID starts with http://www.okta.com/ or https://www.okta.com/.

Create the provider in Magento, and save it as inactive. Copy the SP Entity ID and the ACS URL from the Service Provider fieldset.

  1. In the Okta Admin Console, go to Applications > Applications.

  2. Create a new app integration of the type SAML 2.0.

  3. In Single sign-on URL, enter the ACS URL of Magento.

  4. In Audience URI (SP Entity ID), enter the SP Entity ID of Magento.

  5. In Name ID format, select EmailAddress.

  6. In Application username, select Email.

  7. Add the attribute statements email, firstName and lastName, with the values user.email, user.firstName and user.lastName.

  8. Optional: add a group attribute statement with the name groups and a filter for the groups to send.

  9. On the Sign On tab, copy the metadata URL, and download the IdP metadata file.

  10. On the Assignments tab, assign the users or the groups that can sign in to Magento.

Okta setting Value
Single sign-on URL ACS URL
Audience URI (SP Entity ID) SP Entity ID
Name ID format EmailAddress
Application username Email
IdP metadata On the Sign On tab. Import this file in Magento.
Attribute name Source at Okta Note
email user.email Attribute statement
firstName user.firstName Attribute statement
lastName user.lastName Attribute statement
groups A filter, such as Matches regex .* Group attribute statement. Optional.
amr session.amr Attribute statement. Optional.

The attribute names must be exactly the same as in the Magento attribute mapping. To see the names that Okta sends, test the provider.

  1. Open the provider in Magento.

  2. Click Import Metadata, and select the metadata file of Okta.

  3. In Attribute Mapping > Load Preset, select Okta, if the import did not select it.

  4. Examine the imported values, and the note of the preset.

  5. In Your Password, enter your current admin password.

  6. Click Save and Continue Edit.

  7. Click Test Connection, and sign in with a test user.

  8. If the test succeeds, turn on Active, and save the provider again.

  9. Add and verify the domain of the users.

Okta sends the names of the groups that the filter of the group attribute statement matches. For the role rules, refer to Role mapping.

An Okta FastPass or a security key sign-in can replace the two-factor authentication of Magento. For this, add an attribute statement with the name amr and the value session.amr.

Problem Solution
The mapping fields are empty after the import. The Okta metadata lists no attributes. Select the Okta preset in Load Preset.

For more problems, refer to Troubleshooting.