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, first, you need to install and activate the Group module on your Drupal site.

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 +Add group button.If you do not have any group type then first you will be asked to create a group type.
  • Click Add new group type link.
  • Enter the name in Name text field and title in Title field label text box under the Group settings section.
  • Click the Save group type button.
  • Now, Navigate to the List tab and click on +Add group button.
  • 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.

Configure Group Mapping

  • After successfully performing the Test Configuration, go to the Client Configuration section and navigate to the Manage tab to locate your desired application.
  • In the corresponding application row, click the dropdown arrow next to Attribute Mapping under the Mappings column, and select Group Mapping.
  • In the Group Mapping section, check the Enable Group Mapping checkbox. This step is mandatory.
  • Enter the attribute name in the Group Attribute text field that you are receiving from the OAuth provider.
  • Select the Drupal Group Name from the dropdown list and enter the received attribute value in the OAuth Server Group Name/ID text box. You can add multiple values separating them with ;(semicolon).
  • Click on the 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.