Usage
m365 entra group user set [options]
Description
Updates role of users in an Azure AD group
Options
| Option |
Description |
-i, --groupId [groupId] |
The ID of the Azure AD group. Specify groupId or groupDisplayName but not both. |
-n, --groupDisplayName [groupDisplayName] |
The display name of the Azure AD group. Specify groupId or groupDisplayName but not both. |
--ids [ids] |
Azure AD IDs of users. You can also pass a comma-separated list of IDs. Specify either ids or userNames but not both. |
--userNames [userNames] |
The user principal names of users. You can also pass a comma-separated list of UPNs. Specify either ids or userNames but not both. |
-r, --role <role> |
The new role to be assigned to the users. Valid values: Owner, Member. |
Examples
Update a single user specified by ID to a member of a group specified by display name
m365 entra group user set --groupDisplayName Developers --ids 098b9f52-f48c-4401-819f-29c33794c3f5 --role Member
Update multiple users specified by ID to members of a group specified by ID
m365 entra group user set --groupId a03c0c35-ef9a-419b-8cab-f89e0a8d2d2a --ids "098b9f52-f48c-4401-819f-29c33794c3f5,f1e06e31-3abf-4746-83c2-1513d71f38b8" --role Member
Update a single user specified by UPN to an owner of a group specified by display name
m365 entra group user set --groupDisplayName Developers --userNames [email protected] --role Owner
Update multiple users specified by UPN to owners of a group specified by ID
Default properties
No response
Additional Info
Let's use Graph batching.
Usage
m365 entra group user set [options]
Description
Updates role of users in an Azure AD group
Options
-i, --groupId [groupId]groupIdorgroupDisplayNamebut not both.-n, --groupDisplayName [groupDisplayName]groupIdorgroupDisplayNamebut not both.--ids [ids]idsoruserNamesbut not both.--userNames [userNames]idsoruserNamesbut not both.-r, --role <role>Owner,Member.Examples
Update a single user specified by ID to a member of a group specified by display name
m365 entra group user set --groupDisplayName Developers --ids 098b9f52-f48c-4401-819f-29c33794c3f5 --role MemberUpdate multiple users specified by ID to members of a group specified by ID
Update a single user specified by UPN to an owner of a group specified by display name
Update multiple users specified by UPN to owners of a group specified by ID
Default properties
No response
Additional Info
Let's use Graph batching.