Azure Group import?

Hello,

currently our workflow with azure groups is the following:

  1. someone requests permissions from an azure group
  2. we have to add the azure group as group by typing down the Object-ID as name and in the description we type down the actual group name
  3. we set the permission
  4. bulk apply permission template to the projects
  5. redo step 4 in case new users are logging into Sonarqube

it is quite time consuming and I wanted to know if an import of groups from Azure would make more sense at this point? It would spare us admins the time to set up the groups manually and also fasten the process for users as well.

What are your thoughts on this?

Hi,

The groups need to exist in SonarQube before group import will work. What group import gets you is correctly populating the groups with members.

But you’ll still need to do the admin work in SonarQube to give the groups rights to anything.

 
HTH,
Ann

Hi,

thanks for the reply! That is true but most of it can then be fully automated with API. The following steps can then be done automatically:

  1. create permission template
  2. add group to permission template (which already consists of all members due to the import)
  3. set the permission for the group

The users will then be able to start working with SonarQube immediately. Otherwise I would have to wait until they are logged in and then bulk apply the template to the corresponding projects.

Best regards
Melanie

Hi Melanie,

You need to be aware that groups are only added to a user, i.e. group sync only happens for a user when that user logs in.

However, since you’ll be granting permissions to groups, there’s no timing problem here since people will join their already-permissioned groups on first login.

This gives me the sense that you intend to automate the application of multiple permission templates? Templates are not additive. This is a last-saved-wins proposition. When you apply a template, it replaces the previous project permissions.

What I advise instead:

  • Create all your groups in SonarQube. (Remember, capitalization counts. They must match exactly the ones that will be imported.) Whether that happens manually or via automation is up to you.
  • Create the minimum number of templates necessary to give your sets of groups the permissions they require.
  • Apply the templates as appropriate.

 
HTH,
Ann

Hi G Ann,

thank you for the advise! Perhaps I chose the wrong words, but I actually meant that the automation only applies to one permission template at once :sweat_smile: I am aware that they are not additive. Sorry for the bad description of it.
Currently when creating azure groups we have to place the object ID as a group name so I am not aware of the importance of capitalization. I once contacted the support about it and they have confirmed that the group name should be the object ID in azure. Perhaps that has changed?

The timing problem that I see here is that sometimes when there is a team shift or a new team comes together and they have new Azure Groups then I would have to manually add the group and wait for the user to log in as you said. Only then can I add the group to perhaps existing permission templates and then bulk apply that template to existing projects.

I was thinking of an automation via API, where the customer only has to give us the Azure Group and then the automation will check if the group already exists in SonarQube or not. If it doesn´t then that group will be created and added to the template. So perhaps instead of some kind of import maybe an API that could immediately load the group members via the azure connection would be great too, if the technical implementation is possible.

What are your thoughts on this?

Best regards
Melanie

Hi Melanie,

Ehm… Go with with what Support said. :sweat_smile:

Why? Create the groups and add them to the templates immediately.

And unless there are concerns about granting/revoking group permissions prematurely, I’d go ahead & apply the templates too. That way everything is set up and ready for the next login.

At this point it sounds like you’re looking for SCIM provisioning, which is available starting in Enterprise Edition($$).

 
HTH,
Ann