viva engage community user add
Adds a user to a specific Microsoft 365 Viva Engage community
Usage
m365 viva engage community user add [options]
Options
-i, --communityId [communityId]The ID of the Viva Engage community. Specify
communityId,communityDisplayNameorentraGroupId.-n, --communityDisplayName [communityDisplayName]The display name of the Viva Engage community. Specify
communityId,communityDisplayNameorentraGroupId.--entraGroupId [entraGroupId]The ID of the Microsoft 365 group. Specify
communityId,communityDisplayNameorentraGroupId.--ids [ids]Microsoft Entra IDs of users. You can pass a comma-separated list of multiple IDs. Specify either
idsoruserNamesbut not both.--userNames [userNames]The user principal names of users. You can pass a comma-separated list of multiple UPNs. Specify either
idsoruserNamesbut not both.-r, --role <role>The role to be assigned to the new users. Valid values:
Admin,Member.
-h, --help [help]Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are
options,examples,remarks,permissions,response,full. Default isoptions.--query [query]JMESPath query string. See http://jmespath.org/ for more information and examples.
-o, --output [output]Output type.
json,text,csv,md,none. Defaultjson.--verboseRuns command with verbose logging.
--debugRuns command with debug logging.
Permissions
- Delegated
- Application
| Resource | Permissions |
|---|---|
| Microsoft Graph | GroupMember.ReadWrite.All |
| Resource | Permissions |
|---|---|
| Microsoft Graph | GroupMember.ReadWrite.All |
Examples
Add a single user specified by ID as a member to a community specified by display name.
m365 viva engage community user add --communityDisplayName "All company" --ids 098b9f52-f48c-4401-819f-29c33794c3f5 --role Member
Add multiple users specified by ID as members to a community specified by ID.
m365 viva engage community user add --communityId eyJfdHlwZSI6Ikdyb3VwIiwiaWQiOiIzNjAyMDAxMTAwOSJ9 --ids "098b9f52-f48c-4401-819f-29c33794c3f5,f1e06e31-3abf-4746-83c2-1513d71f38b8" --role Member
Add a single user specified by UPN as an admin to a community specified by display name.
m365 viva engage community user add --communityDisplayName "All company" --userNames john.doe@contoso.com --role Admin
Adds multiple users specified by UPN as admins to a community specified by its group ID.
m365 viva engage community user add --entraGroupId a03c0c35-ef9a-419b-8cab-f89e0a8d2d2a --userNames "john.doe@contoso.com,adele.vance@contoso.com" --role Admin
Response
The command won't return a response on success.