Role Mapping
The role mapping feature allows you to map the Drupal roles and permissions to the users based on the attributes received from the OAuth or OpenID Connect Provider. This feature allows the assignment of roles to the user in Drupal after performing a successful SSO.
Configure Role Mapping
Watch how to configure Role Mappings: ▶ Watch Setup Video
- 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 Role Mapping.
- In the Role Mapping section, check the Enable Role Mapping checkbox. This step is mandatory.
- Now, select the default role for the new user from the Select the default role for new users dropdown. This role will be assigned to the newly created user on their first login.
- Click on the Save button.
Role Mapping Settings
Keep Existing Role
- If you are not mapping roles and want keep users with their existing roles then, check the Keep Existing Roles checkbox.
Role Attribute
- Enter the attribute parameter name in which you are receiving the roles. This step is mandatory to Role Mapping work properly.
Drupal Role
- The Drupal Role dropdown provides default drupal roles.
- Select the Drupal Role from the dropdown that you want to assign to a user on the basis of their role coming from the OAuth provider.
OAuth Server/Provider Role
- In the OAuth Server/Provider Role text field, enter the value of the attribute parameter in which you are receiving the roles from the provider.
- If you want to add multiple roles, then enter the number of row that you want to add and then click the Add button.
- Then, click Save button.