Bulk Import Governance Groups

Governance groups

It is a group of users that can make governance decisions about access. If your organization has the Access Request or Certifications service, you can configure governance groups to review access requests or certifications. A governance group can help determine whether specific access is appropriate for a user.

Use Case

Bulk import of Governance Groups from a CSV file. There is no V3/Beta API available to support bulk creation of governance groups.

Solution

A powershell script that uses the V3/Beta APIs to Create Governance Group and adds members to it. I thought about using the Powershell SDK for this but it doesn’t include the Beta Workgroup APIs yet, only supports V2 which might be deprecated soon.

Script Input Parameters

  1. Tenant Name
  2. Client ID
  3. Client Secret
  4. Governance Group Owner Username
  5. Full path of the CSV File to be imported

Script

This script is very basic, please modify it to suit your needs. In my case we had a single admin user as owner of all governance groups. If you need different owners, it can be added as a column to csv file and the script will have to be tweaked slightly to get input from file instead of a prompt, and move that logic into the loop.

BulkImportGovernanceGroups.ps1 (4.2 KB)
ADGovernanceGroups.csv (137 Bytes)

2 Likes

Hi after running the provided script, this script is waiting for some input, not sure what input to provide.

because i updated the script with the PAT token(client id and client secret) given tenant name wherever required and also provided the csv path name

Did you provide this also?

If you can provide the exact error that will help with better troubleshooting.