We've updated our file storage system, so some links may no longer work. If you need a file, just email us at support@secomea.com—we’re happy to help!

Making bulk changes to role and path

Prev Next

Making bulk changes to role and path

It is possible to execute changes to role and path in bulk. Please refer to this example for the needed syntax.

Connect-MgGraph -Scopes "User.ReadWrite.All"
# Bulk (users.csv with: userPrincipalName,role,path)
# user1@acme.com,DOM,Europe/Germany
# user2@acme.com,DOM,Europe/Denmark
Import-Csv "./users.csv" | ForEach-Object {
Update-MgUser -UserId $_.userPrincipalName -OnPremisesExtensionAttributes @{
ExtensionAttribute1 = $_.role
ExtensionAttribute2 = $_.path
}
}