G Suite (Google Apps) Directory Integration


OneLogin's integration with G Suite ties together your existing G Suite user management system with the web-based applications used by your company, providing an Identity and Access Management system rooted in your G Suite account. This is achieved by:

When used together with the G Suite SAML connector, the G Suite Directory Connector can create a real-time bidirectional integration between OneLogin and G Suite, keeping OneLogin updated whenever users are added or updated in G Suite, and G Suite updated whenever users are added or updated in OneLogin. To find out more, watch our Configuring OneLogin's G Suite App Connector (Google Workspace) two-part video series.

Prerequisites: G Suite Administrator account with access to create/delete/update users and groups data.


Configuring the G Suite Directory Connector

  1. In OneLogin, go to Users > Directories, click the New Directory button, and click the Choose button for G Suite or G Suite Advanced (if your plan includes the Advanced Directory add-on). Or, if you are editing a directory connector that you have already saved, select it directly from the Users > Directories page.

    If G Suite Advanced is not available when adding a new directory:
    • Make sure your plan includes the Advanced Directory add-on.
    • Contact your OneLogin account manager and ensure that your account has Enabled Advanced Directory Field Mappings.

Mapping Google Groups to OneLogin Attributes

Note: Because this mapping requires a custom field, you must be on an a plan that allows custom fields. See our plan and pricing information.

If you are using G Suite as your user directory, you may want to use Google Group membership to determine OneLogin security Levels (through OneLogin group membership) or app access (through OneLogin roles). These instructions can also be applied to mapping any available G Suite attribute to a OneLogin attribute. To enable this mapping of Google Group membership to OneLogin roles, security policies, or other attributes, the best practice is to map your users' Google Group value to their MemberOf attribute in OneLogin.

Note: A common identification for the correct mapping group is MemberOf. While Google Groups does not natively use that phrase, this guide will use it as a reference point for the sake of simplicity.

  1. Create a custom user field to hold the attribute.

    1. Go to User > All Users and select Custom User Fields under More Actions

    2. Click New User Field.

    3. Enter a Name and Shortname (no spaces) for the user field.

  2. Map the new user field to the MemberOf attribute.

    1. Go to Users > Mappings and click the New Mappings button.

    2. Name the mapping and select the Conditions for the mapping.
      Image of the Conditions fields of the Mappings screen

    3. Set the Actions to Set MemberOf and the value to the short name of the customer user field, using the syntax custom_attribute_short_name_of_field
      Image of the Actions fields of the Mapping screen

    4. Return to the Users > Mappings page and click Reapply all mappings.

  3. Map Google Groups to the new custom user field.

    1. Go to Users > All Users and select a user that was imported from your G Suite directory.

    2. On the Directories Attributes table, click the + plus sign to add an attribute mapping.

    3. Under Directory Field, select Groups from the drop-down.

    4. Under OneLogin Field, select the user field that you created above.

    5. Click Save.

    6. Open your Gsuite Directory in OneLogin and click on Sync Users.

  4. Verify that your users' Google Group group membership is mapped as their MemberOf value.

    1. Go to User > All User and select a user that was imported from your G Suite directory.

    2. On the User Info tab, view the Directory Details section. The Member of value must be name=users_google_group.

      The actual name of the Google Group will not import into OneLogin; for example, a Google Group in Gsuite called Non Admins will import into OneLogin as name=Non Admins. It is necessary to include the name= portion when creating mappings, or they will not work properly.

Now when you sync users from G Suite to OneLogin, each users MemberOf attribute will hold that user's Google Group value. And you can use Google Group membership to assign OneLogin roles, statuses, security policy (through OneLogin group membership), or any other OneLogin attribute that you want, simply by mapping from MemberOf. For more information about using mapping to assign roles, see Mappings