Skip to content

Group Sync

Michael Johnson edited this page Jan 20, 2019 · 5 revisions

Syncing Groups with Active Directory

As an advanced configuration option, you can sync group membership in the Azure Active Directory with SonarQube. This feature was introduced in version 1.1 RC1 of the plugin.

This feature works by matching the names of the Active Directory groups to which the logged in user belongs with those in SonarQube and adjusting the membership on login.

Limitations

The plugin doesn't work with indirect group membership, such as when a group is a member of another group.

Setup Group Sync

Configuring Azure Active Directory

  1. To begin, sign into the Azure Management Portal. (If you are using one of the "national cloud" Azure instances, log in using the correct portal URL for your country.)

  2. Open the Azure Active Directory blade from the shortcut on the left, or if the shortcut is missing, search from the top of the page.

  3. On the sidebar, under the Manage category, choose App registrations and then select the application you registered for SonarQube.

  4. Click on the Settings button at the top of the screen and then select Required permissions. Select "Windows Azure Active Directory" from the list that appears. Make sure that "Read directory data" from the "Delegated Permissions" section is selected. Make sure to select Save to update the permissions.

  5. Click on the Grant permissions button at the top of the previous pane. This will grant the permissions that you selected and allow the plugin to read the user's groups. This step _must _ be done or group sync will not work.

Configuring the Plugin

  1. Log into your SonarQube install with an account that has administrative permission.

  2. Click on the Administration header at the top, then select the Azure Active Directory tab from the general settings area.

  3. Toggle the setting labeled Enable Groups Synchronization to on/enabled to activate the plugin.

Using Group Sync

This is a very easy process. All you need to do is create a security group in SonarQube with the same name as one in your Active Directory. The name must match exactly or the sync will not work. Once a user logs into your SonarQube install that's a member of that group, they will be added to that group in SonarQube. If they are removed from that group in AD, then they will be removed from the group in SonarQube once they log back in.

Clone this wiki locally