How to Add Description to Multiple Groups in Azure Active Diretcory

There are a variety of ways to manage groups because Azure has good, well-documented APIs. The most common way to manage them with a UI is the Azure Portal. The Azure Portal is fully featured, so users with the appropriate roles can create, edit, view, and delete Azure AD Groups from there. however, when it comes to performing actions on multiple groups then we can use PowerShell. In this article, we will see how we can set or add descriptions for multiple groups in Azure AD.

Step 1: Create a CSV file with group objectid and descriptions. You can use the following format for the CSV file.

f8f3b56e-56b1-49c0-b8ec-a061e6c9ac07,This is test description for group name TestAA-Usman
a7013eb0-1973-4232-ad73-a7d9ac0968ba,This is test description for group name TestAA-Usman

Step 2: Connect to Azure AD with PowerShell and run the following script.

$file = Import-Csv “C:\temp\groups.csv”
foreach ($line in $file){
set-Azureadgroup -ObjectId “$($line.groupobjectid)” -description “$($line.description)”

You can also find the script and CSV file here to download.

Leave A Reply

Your email address will not be published.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More