Microsoft Entra ID
Use an enterprise application in Microsoft Entra ID. The preset uses the default claims of Entra ID.
Preset values
Section titled “Preset values”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/.
Before you start
Section titled “Before you start”Create the provider in Magento, and save it as inactive. Copy the SP Entity ID and the ACS URL from the Service Provider fieldset.
Configure Microsoft Entra ID
Section titled “Configure Microsoft Entra ID”-
In the Microsoft Entra admin center, go to Enterprise applications.
-
Create a new application of your own, that is not in the gallery.
-
Open Single sign-on, and select SAML.
-
In Basic SAML Configuration, enter the SP Entity ID of Magento in Identifier (Entity ID).
-
Enter the ACS URL of Magento in Reply URL (Assertion Consumer Service URL).
-
In Attributes & Claims, keep the default claims for the email address, the given name and the surname.
-
Optional: add a group claim. Entra ID sends the groups only after you add this claim.
-
In SAML Certificates, download the Federation Metadata XML file.
-
In Users and groups, assign the users or the groups that can sign in to Magento.
Microsoft Entra ID settings at a glance
Section titled “Microsoft Entra ID settings at a glance”| 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.
Configure Magento
Section titled “Configure Magento”-
Open the provider in Magento.
-
Click Import Metadata, and select the metadata file of Microsoft Entra ID.
-
In Attribute Mapping > Load Preset, select Microsoft Entra ID, if the import did not select it.
-
Examine the imported values, and the note of the preset.
-
In Your Password, enter your current admin password.
-
Click Save and Continue Edit.
-
Click Test Connection, and sign in with a test user.
-
If the test succeeds, turn on Active, and save the provider again.
-
Add and verify the domain of the users.
Groups and roles
Section titled “Groups and roles”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.
Two-factor authentication
Section titled “Two-factor authentication”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.
-
Open the app registration of the application.
-
Open Manifest.
-
In
optionalClaims.saml2Token, add this claim:{ "name": "amr", "additionalProperties": ["include_granular_amr"] } -
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.
Common problems
Section titled “Common problems”| 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.