Group Mapping - OAuth & OIDC Login

Last updated on
4 December 2025

Group Mapping

This feature allows you to map roles/groups received from your OAuth Provider to your existing groups in Drupal. To enable this feature, you first need to install and activate the Group module on your Drupal site.

Prerequisite:

Add Group type and Group to Drupal site

  • After installing the modules you can see Groups in the menu bar. Navigate to the Groups tab and start creating groups.
  • Click the +Add group button. If you do not have any group type then first you will be asked to create a group type.
  • Click the Add new group type link.
  • Enter the name in the Name text field and the title in the Title field label text box under the Group settings section.
  • Click the Save group type button.
     

    Drupal-OAuth-Client-Add-Group-Type

  • Now, Navigate to the List tab and click on +Add group button.
     

    Drupal-OAuth-Client-Navigate-List-Tab-Click-Add-Group

  • Enter the name in the text Maintainers text box, click on Create site maintainers and complete your membership button.
  • In the next step enter URL alias in URL alias text box and click on the Save group and membership button.
  • You successfully created a group.
     

    Drupal-OAuth-Client-Add-Group

Configure Group Mapping

  • Now, navigate to the Edit tab, under the Client Configuration tab.
  • In the Edit tab, under the Group Mapping section, check the Enable Group Mapping checkbox. It is mandatory for group mapping.

    Drupal-OAuth-Client-Group-Mapping-Enable-Group-Mapping

  • Enter the attribute name through which you receive the user groups from your OAuth provider, and specify this attribute in the Group Attribute text field.

    Drupal-OAuth-Client-Group-Mapping-Enter-Group-Attribute

  • Select the Drupal Group Name from the dropdown list and enter the received attribute value in the OAuth Server Group Name/ID text box.
  • Click on the Save Configuration button.
     

    Drupal-OAuth-Client-Group-Mapping-Select-Group-Enter-OAuth-Server-Name-Click-Save-button

Let’s see how Group Mapping works:

  • Open an incognito window / new browser. Navigate to the Drupal site login page and log in with the provider name link.
  • Now, navigate to the Groups tab and click on the group name link.
  • Navigate to the Members tab. You can see the member added from the OAuth server.
     

    OAuth-Group-Module-Mapping-How-It-Works

Contact our 24*7 support team

Feel free to reach out to our Drupal experts if you need any sort of assistance in setting up OAuth2 Client SSO Login on your Drupal site.

 Get In Touch With Us Join Our Slack Channel

Help improve this page

Page status: No known problems

You can: