Skip to Content
Communication Square LLC Help Center

Add members to Unified Groups using CSV

Written October 2020. Microsoft changes these admin screens often, so the screenshots below may not match what you see today. The sequence of steps is usually still correct — if something looks wrong, tell us and we'll update it.

user@contoso.com:

This script is used to add members to the unified groups using CSV File.

The CSV file should contain the following columns:

-Identity:  Identity parameter specifies the Microsoft 365 Group that you want to modify. (Name, DN, email any one of these which should be unique)

-LinkType: The LinkType parameter specifies the Microsoft 365 Group property that you want to modify. (Member, Owner, Subscriber)

-Links: The Links parameter specifies the recipients to add to the Microsoft 365 Group. (UPN of the user)

Script:

Install-Module -Name AzureAD

Connect-AzureAD

Install-Module -Name Msonline

Connect-MsolService

Import-Csv -Path "C:\Users\tv\Desktop\office365.csv" | foreach {

Add-UnifiedGroupLinks –Identity $._name  –LinkType Members  –Links $_.members

}

Last updated on