Google Workspace
Use a custom SAML app in the Google Admin console. Google sends only the attributes that the attribute mapping of the app defines.
Preset values
Section titled “Preset values”The Google Workspace / Cloud Identity 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 https://accounts.google.com/o/saml2?idpid=.
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 Google Workspace
Section titled “Configure Google Workspace”-
In the Google Admin console, go to Apps > Web and mobile apps.
-
Add a custom SAML app.
-
Download the IdP metadata.
-
In ACS URL, enter the ACS URL of Magento.
-
In Entity ID, enter the SP Entity ID of Magento.
-
In Name ID format, select EMAIL. In Name ID, select Primary email.
-
In the attribute mapping, map Primary email to
email, First name tofirstNameand Last name tolastName. -
Optional: in Group membership, select the groups, and enter
groupsas the app attribute. -
Turn on the app for the organizational units or the groups that can sign in to Magento.
Google Workspace settings at a glance
Section titled “Google Workspace settings at a glance”| Google Workspace setting | Value |
|---|---|
| ACS URL | ACS URL |
| Entity ID | SP Entity ID |
| Name ID format | |
| Name ID | Basic Information > Primary email |
| IdP metadata | Download it when you create the app. Import this file in Magento. |
| Attribute name | Source at Google Workspace | Note |
|---|---|---|
email |
Primary email | Attribute mapping |
firstName |
First name | Attribute mapping |
lastName |
Last name | Attribute mapping |
groups |
Group membership | Optional |
The attribute names must be exactly the same as in the Magento attribute mapping. To see the names that Google Workspace sends, test the provider.
Configure Magento
Section titled “Configure Magento”-
Open the provider in Magento.
-
Click Import Metadata, and select the metadata file of Google Workspace.
-
In Attribute Mapping > Load Preset, select Google Workspace / Cloud Identity, 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”Google sends the names of the groups. For the role rules, refer to Role mapping.
Two-factor authentication
Section titled “Two-factor authentication”Google does not send how the user authenticated. Thus the two-factor authentication of Magento always applies.
Common problems
Section titled “Common problems”| Problem | Solution |
|---|---|
| The login fails after you turn on the app. | A change of the user access in Google can take some time. Wait, and try again. |
For more problems, refer to Troubleshooting.