Export the members of a project level group from all the projects in an Azure DevOps


How many project administrators do you have on an average per project? Though there is no real mandate or best practice on the number, I think you don’t want too many people with project admin privileges. This could also be an auditing question to figure out who can do what. Same can be the case with Build and Release admin group, other default groups or any of the custom security groups that you may have created at the project level.

If you are trying to export such a list, here is a script that can help you.
You can provide any project level group as the input to the script, and it will export a list containing the members of the group, across all the projects in your organization to a csv file.  The script lists both users and groups that are members of the group given as input, but do not expand groups further.
You can then filter by project to look at the details of individual projects.

How to run the script:

  1. The script takes three parameters:
    • Name of the Azure DevOps organization.
    • PAT token with collection level permissions.
    • Name of the project level group. If you need to export the project admin list, give "Project Administrators" as the group name. The complete name of a project level group will be [ProjectName]\GroupName, you just have to provide GroupName as the input.

  1. Invoke the script with the above parameters. If the provided group name exists in at least one project in the organization, as csv file will be generated at the same location from where you are running the script.


Hope this helps!




Comments

Popular posts from this blog

Azure DevOps - getting project stats for all projects

Managing user licenses and cost for Azure DevOps.