Skip to content

Microsoft Entra ID

Use an enterprise application in Microsoft Entra ID. The preset uses the default claims of Entra ID.

The Microsoft Entra ID preset fills in these attributes:

Field Attribute
Email Attribute http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress
First Name Attribute http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname
Last Name Attribute http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname
Group Attribute http://schemas.microsoft.com/ws/2008/06/identity/claims/groups

The import selects this preset when the IdP entity ID starts with https://sts.windows.net/.

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 Microsoft Entra admin center, go to Enterprise applications.

  2. Create a new application of your own, that is not in the gallery.

  3. Open Single sign-on, and select SAML.

  4. In Basic SAML Configuration, enter the SP Entity ID of Magento in Identifier (Entity ID).

  5. Enter the ACS URL of Magento in Reply URL (Assertion Consumer Service URL).

  6. In Attributes & Claims, keep the default claims for the email address, the given name and the surname.

  7. Optional: add a group claim. Entra ID sends the groups only after you add this claim.

  8. In SAML Certificates, download the Federation Metadata XML file.

  9. In Users and groups, assign the users or the groups that can sign in to Magento.

Microsoft Entra ID setting Value
Identifier (Entity ID) SP Entity ID
Reply URL (Assertion Consumer Service URL) ACS URL
Sign on URL Leave empty. Users start the login on the Magento admin login page.
Federation Metadata XML Import this file in Magento.
Attribute name Source at Microsoft Entra ID Note
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress user.mail Default claim
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname user.givenname Default claim
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname user.surname Default claim
http://schemas.microsoft.com/ws/2008/06/identity/claims/groups Group object IDs Add a group claim
amr Granular authentication methods Optional. Edit the manifest.

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

  1. Open the provider in Magento.

  2. Click Import Metadata, and select the metadata file of Microsoft Entra ID.

  3. In Attribute Mapping > Load Preset, select Microsoft Entra ID, 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.

By default, Entra ID sends the object IDs of the groups, not their names. Use the object IDs as the Group Value of the role rules. For the role rules, refer to Role mapping.

A passkey, a security key or a Windows Hello for Business sign-in can replace the two-factor authentication of Magento. For this, Entra ID must send the granular authentication methods.

  1. Open the app registration of the application.

  2. Open Manifest.

  3. In optionalClaims.saml2Token, add this claim:

    { "name": "amr", "additionalProperties": ["include_granular_amr"] }
  4. Save the manifest.

Without this claim, Entra ID sends only password and multipleauthn for all methods. These values do not tell if the method was phishing-resistant. The module also accepts the SmartcardPKI authentication context class. Entra ID reports this class for FIDO2 security keys, device-bound passkeys, Windows Hello for Business and multifactor certificate-based authentication.

Problem Solution
The login fails with “The login has no email address.” The user has no email address in Entra ID. Set the Email of the user, or map the email claim to another user attribute.
The role rules do not match. Entra ID sends group object IDs. Copy the IDs from the test result.

For more problems, refer to Troubleshooting.