Tutorial: Azure Active Directory integration with G Suite

In this tutorial, you learn how to integrate G Suite with Azure Active Directory (Azure AD). Integrating G Suite with Azure AD provides you with the following benefits:

  • You can control in Azure AD who has access to G Suite.
  • You can enable your users to be automatically signed-in to G Suite (Single Sign-On) with their Azure AD accounts.
  • You can manage your accounts in one central location - the Azure portal.

If you want to know more details about SaaS app integration with Azure AD, see What is application access and single sign-on with Azure Active Directory. If you don't have an Azure subscription, create a free account before you begin.

Prerequisites

To configure Azure AD integration with G Suite, you need the following items:

  • An Azure AD subscription
  • A G Suite single sign-on enabled subscription
  • A Google Apps subscription or Google Cloud Platform subscription.

Note

To test the steps in this tutorial, we do not recommend using a production environment. This document was created using the new user Single-Sign-on experience. If you are still using the old one, the setup will look different. You can enable the new experience in the Single Sign-on settings of G-Suite application. Go to Azure AD, Enterprise applications, select G Suite, select Single Sign-on and then click on Try out our new experience.

To test the steps in this tutorial, you should follow these recommendations:

  • Do not use your production environment, unless it is necessary.
  • If you don't have an Azure AD trial environment, you can get a one-month trial.

Frequently Asked Questions

  1. Q: Does this integration support Google Cloud Platform SSO integration with Azure AD?

    A: Yes. Google Cloud Platform and Google Apps share the same authentication platform. So to do the GCP integration you need to configure the SSO with Google Apps.

  2. Q: Are Chromebooks and other Chrome devices compatible with Azure AD single sign-on?

    A: Yes, users are able to sign into their Chromebook devices using their Azure AD credentials. See this G Suite support article for information on why users may get prompted for credentials twice.

  3. Q: If I enable single sign-on, will users be able to use their Azure AD credentials to sign into any Google product, such as Google Classroom, GMail, Google Drive, YouTube, and so on?

    A: Yes, depending on which G Suite you choose to enable or disable for your organization.

  4. Q: Can I enable single sign-on for only a subset of my G Suite users?

    A: No, turning on single sign-on immediately requires all your G Suite users to authenticate with their Azure AD credentials. Because G Suite doesn't support having multiple identity providers, the identity provider for your G Suite environment can either be Azure AD or Google -- but not both at the same time.

  5. Q: If a user is signed in through Windows, are they automatically authenticate to G Suite without getting prompted for a password?

    A: There are two options for enabling this scenario. First, users could sign into Windows 10 devices via Azure Active Directory Join. Alternatively, users could sign into Windows devices that are domain-joined to an on-premises Active Directory that has been enabled for single sign-on to Azure AD via an Active Directory Federation Services (AD FS) deployment. Both options require you to perform the steps in the following tutorial to enable single sign-on between Azure AD and G Suite.

  6. Q: What should I do when I get an "invalid email" error message?

    A: For this setup, the email attribute is required for the users to be able to sign-in. This attribute cannot be set manually.

    The email attribute is autopopulated for any user with a valid Exchange license. If user is not email-enabled, this error will be received as the application needs to get this attribute to give access.

    You can go to portal.office.com with an Admin account, then click in the Admin center, billing, subscriptions, select your Office 365 Subscription and then click on assign to users, select the users you want to check their subscription and in the right pane, click on edit licenses.

    Once the O365 license is assigned, it may take some minutes to be applied. After that, the user.mail attribute will be autopopulated and the issue should be resolved.

Scenario description

In this tutorial, you configure and test Azure AD single sign-on in a test environment.

To configure the integration of G Suite into Azure AD, you need to add G Suite from the gallery to your list of managed SaaS apps.

To add G Suite from the gallery, perform the following steps:

  1. In the Azure portal, on the left navigation panel, click Azure Active Directory icon.

    The Azure Active Directory button

  2. Navigate to Enterprise Applications and then select the All Applications option.

    The Enterprise applications blade

  3. To add new application, click New application button on the top of dialog.

    The New application button

  4. In the search box, type G Suite, select G Suite from result panel then click Add button to add the application.

    G Suite in the results list

Configure and test Azure AD single sign-on

In this section, you configure and test Azure AD single sign-on with G Suite based on a test user called Britta Simon. For single sign-on to work, a link relationship between an Azure AD user and the related user in G Suite needs to be established.

To configure and test Azure AD single sign-on with G Suite, you need to complete the following building blocks:

  1. Configure Azure AD Single Sign-On - to enable your users to use this feature.
  2. Configure G Suite Single Sign-On - to configure the Single Sign-On settings on application side.
  3. Create an Azure AD test user - to test Azure AD single sign-on with Britta Simon.
  4. Assign the Azure AD test user - to enable Britta Simon to use Azure AD single sign-on.
  5. Create G Suite test user - to have a counterpart of Britta Simon in G Suite that is linked to the Azure AD representation of user.
  6. Test single sign-on - to verify whether the configuration works.

Configure Azure AD single sign-on

In this section, you enable Azure AD single sign-on in the Azure portal.

To configure Azure AD single sign-on with G Suite, perform the following steps:

  1. In the Azure portal, on the G Suite application integration page, select Single sign-on.

    Configure single sign-on link

  2. On the Select a Single sign-on method dialog, select SAML/WS-Fed mode to enable single sign-on.

    Single sign-on select mode

  3. On the Set up Single Sign-On with SAML page, click Edit icon to open Basic SAML Configuration dialog.

    Edit Basic SAML Configuration

  4. On the Basic SAML Configuration section, if you want to configure for the Gmail perform the following steps:

    G Suite Domain and URLs single sign-on information

    a. In the Sign-on URL textbox, type a URL using the following pattern: https://www.google.com/a/<yourdomain.com>/ServiceLogin?continue=https://mail.google.com

    b. In the Identifier textbox, type a URL using the following pattern:

    google.com/a/<yourdomain.com>
    google.com
    https://google.com
    https://google.com/a/<yourdomain.com>

    Note

    These values are not real. Update these values with the actual Sign-On URL and Identifier. Contact G Suite Client support team to get these values.

  5. On the Basic SAML Configuration section, if you want to configure for the Google Cloud Platform perform the following steps:

    G Suite Domain and URLs single sign-on information

    a. In the Sign-on URL textbox, type a URL using the following pattern: https://www.google.com/a/<yourdomain.com>/ServiceLogin?continue=https://console.cloud.google.com

    b. In the Identifier textbox, type a URL using the following pattern:

    google.com/a/<yourdomain.com>
    google.com
    https://google.com
    https://google.com/a/<yourdomain.com>

    Note

    These values are not real. Update these values with the actual Sign-On URL and Identifier. Contact G Suite Client support team to get these values.

  6. Your G Suite application expects the SAML assertions in a specific format, which requires you to add custom attribute mappings to your SAML token attributes configuration. The following screenshot shows an example for this. The default value of Unique User Identifier is user.userprincipalname but G Suite expects this to be mapped with the user's email address. For that you can use user.mail attribute from the list or use the appropriate attribute value based on your organization configuration.

    image

  7. In the User Claims section on the User Attributes dialog, edit the claims by using Edit icon or add the claims by using Add new claim to configure SAML token attribute as shown in the image above and perform the following steps:

    Name Source Attribute
    Unique User Identifier User.mail

    a. Click Add new claim to open the Manage user claims dialog.

    image

    image

    b. In the Name textbox, type the attribute name shown for that row.

    c. Leave the Namespace blank.

    d. Select Source as Attribute.

    e. From the Source attribute list, type the attribute value shown for that row.

    f. Click Ok

    g. Click Save.

  8. On the Set up Single Sign-On with SAML page, in the SAML Signing Certificate section, click Download to download the Certificate (Base64) from the given options as per your requirement and save it on your computer.

    The Certificate download link

  9. On the Set up G Suite section, copy the appropriate URL(s) as per your requirement.

    Copy configuration URLs

    a. Login URL

    b. Azure Ad Identifier

    c. Logout URL

Configure G Suite Single Sign-On

  1. Open a new tab in your browser, and sign into the G Suite Admin Console using your administrator account.

  2. Click Security. If you don't see the link, it may be hidden under the More Controls menu at the bottom of the screen.

    Click Security.

  3. On the Security page, click Set up single sign-on (SSO).

    Click SSO.

  4. Perform the following configuration changes:

    Configure SSO

    a. Select Setup SSO with third-party identity provider.

    b. In the Sign-in page URL field in G Suite, paste the value of Login URL which you have copied from Azure portal.

    c. In the Sign-out page URL field in G Suite, paste the value of Logout URL which you have copied from Azure portal.

    d. In the Change password URL field in G Suite, paste the value of Change password URL which you have copied from Azure portal.

    e. In G Suite, for the Verification certificate, upload the certificate that you have downloaded from Azure portal.

    f. Select Use a domain specific issuer.

    g. Click Save Changes.

Create an Azure AD test user

The objective of this section is to create a test user in the Azure portal called Britta Simon.

  1. In the Azure portal, in the left pane, select Azure Active Directory, select Users, and then select All users.

    The "Users and groups" and "All users" links

  2. Select New user at the top of the screen.

    New user Button

  3. In the User properties, perform the following steps.

    The User dialog box

    a. In the Name field enter BrittaSimon.

    b. In the User name field type brittasimon@yourcompanydomain.extension
    For example, BrittaSimon@contoso.com

    c. Select Show password check box, and then write down the value that's displayed in the Password box.

    d. Click Create.

Assign the Azure AD test user

In this section, you enable Britta Simon to use Azure single sign-on by granting access to G Suite.

  1. In the Azure portal, select Enterprise Applications, select All applications, then select G Suite.

    Enterprise applications blade

  2. In the applications list, type and select G Suite.

    The G Suite link in the Applications list

  3. In the menu on the left, select Users and groups.

    The "Users and groups" link

  4. Click the Add user button, then select Users and groups in the Add Assignment dialog.

    The Add Assignment pane

  5. In the Users and groups dialog select Britta Simon in the Users list, then click the Select button at the bottom of the screen.

  6. If you are expecting any role value in the SAML assertion then in the Select Role dialog select the appropriate role for the user from the list, then click the Select button at the bottom of the screen.

  7. In the Add Assignment dialog click the Assign button.

Create G Suite test user

The objective of this section is to create a user called Britta Simon in G Suite Software. G Suite supports auto provisioning, which is by default enabled. There is no action for you in this section. If a user doesn't already exist in G Suite Software, a new one is created when you attempt to access G Suite Software.

Note

Make sure that your user already exists in G Suite if provisioning in Azure AD has not been turned on before testing Single Sign-on.

Note

If you need to create a user manually, contact the Google support team.

Test single sign-on

In this section, you test your Azure AD single sign-on configuration using the Access Panel.

When you click the G Suite tile in the Access Panel, you should be automatically signed in to the G Suite for which you set up SSO. For more information about the Access Panel, see Introduction to the Access Panel.

Additional Resources