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
}
}