Group Module 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 module mapping
- Now, navigate to the Group module mapping section, under the Attributes & Role Mapping tab.
- Check the Enable Group Mapping checkbox. It is mandatory for role mapping.
- 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.
- Click on the Save Configuration button.
Let’s see how Group module 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.