Usage
m365 viva engage role member add [options]
Description
Assign a Viva Engage role to a user.
Options
| Option |
Description |
--roleId [roleId] |
The id of the Viva Engage role. Specify either roleId or roleName, but not both. |
--roleName [roleName] |
The name of the Viva Engage role. Specify either roleId or roleName, but not both. |
--userId [userId] |
The id of the user to be assigned to the role. Specify either userId or userName, but not both. |
--userName [userName] |
The UPN of the user to be assigned to the role. Specify either userId or userName, but not both. |
Examples
Assign a user specified by id to the role specified by name
m365 viva engage role member add --userId 7a2ca997-9461-402e-9882-58088a370889 --roleName 'Verified Admin'
Assign a user specified by UPN to the role specified by id
m365 viva engage role member add --userName john.doe@contoso.com --roleId 77aa47ad-96fe-4ecc-8024-fd1ac5e28f17
Default properties
Additional Info
Requires new permission EngagementRole.ReadWrite.All
It's a beta endpoint, let's not forget to mention this in the docs with an admonition.
More info: https://learn.microsoft.com/graph/api/engagementrole-post-members?view=graph-rest-beta
Usage
m365 viva engage role member add [options]
Description
Assign a Viva Engage role to a user.
Options
--roleId [roleId]roleIdorroleName, but not both.--roleName [roleName]roleIdorroleName, but not both.--userId [userId]userIdoruserName, but not both.--userName [userName]userIdoruserName, but not both.Examples
Assign a user specified by id to the role specified by name
m365 viva engage role member add --userId 7a2ca997-9461-402e-9882-58088a370889 --roleName 'Verified Admin'Assign a user specified by UPN to the role specified by id
Default properties
Additional Info
Requires new permission
EngagementRole.ReadWrite.AllIt's a beta endpoint, let's not forget to mention this in the docs with an admonition.
More info: https://learn.microsoft.com/graph/api/engagementrole-post-members?view=graph-rest-beta