Skip to main content

viva engage community add

Creates a new community in Viva Engage

Usage

m365 viva engage community add [options]

Options

--displayName <displayName>

The name of the community. The maximum length is 255 characters.

--description <description>

The description of the community. The maximum length is 1024 characters.

--privacy <privacy>

Defines the privacy level of the community. The possible values are: public, private.

--adminEntraIds [adminEntraIds]

Comma-separated list of Microsoft Entra IDs, assigning admin privileges to the designated individuals. Required when using application permissions. Specify either adminEntraIds or adminEntraUserNames, but not both.

--adminEntraUserNames [adminEntraUserNames]

Comma-separated list of Microsoft Entra UPNs, assigning admin privileges to the designated individuals. Required when using application permissions. Specify either adminEntraIds or adminEntraUserNames, but not both.

--wait

Wait for the operation to finish.

-h, --help [help]

Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are options, examples, remarks, response, full. Default is options.

--query [query]

JMESPath query string. See http://jmespath.org/ for more information and examples.

-o, --output [output]

Output type. json, text, csv, md, none. Default json.

--verbose

Runs command with verbose logging.

--debug

Runs command with debug logging.

Remarks

warning

This command is based on an API that is currently in preview and is subject to change once the API reaches general availability.

Creating a community is limited to networks in Native mode only - legacy and external Yammer networks will not be able to use this API for community creation.

Examples

Create a public community and wait for the community to be created

m365 viva engage community add --displayName "Software engineers" --description "A community for all software engineers" --privacy public --wait

Create a private community

m365 viva engage community add --displayName "Software engineers" --description "A community for all software engineers" --privacy private

Create a private community with owners

m365 viva engage community add --displayName "Software engineers" --description "A community for all software engineers" --privacy private --adminEntraUserNames "john.doe@contoso.onmicrosoft.com,jane.doe@contoso.onmicrosoft.com"

Response

Standard response

"https://graph.microsoft.com/beta/employeeExperience/engagementAsyncOperations('eyJfdHlwZSI6IkxvbmdSdW5uaW5nT3BlcmF0aW9uIiwiaWQiOiI4ZmM2NzEyZS0wMWY4LTQxN2YtYWNmMS1iZTJiYmMxY2FjNGQiLCJvcGVyYXRpb24iOiJDcmVhdGVDb21tdW5pdHkifQ')"

wait response

When we make use of the option wait the response will differ.

{
"id": "eyJfdHlwZSI6IkxvbmdSdW5uaW5nT3BlcmF0aW9uIiwiaWQiOiI2ODgxMGQ4ZS1lODk2LTRhNzEtYWM5NC02NGIyZThlMmMyOGUiLCJvcGVyYXRpb24iOiJDcmVhdGVDb21tdW5pdHkifQ",
"createdDateTime": "2024-04-10T12:16:18.0240578Z",
"lastActionDateTime": "2024-04-10T12:16:18.0240592Z",
"status": "succeeded",
"statusDetail": null,
"resourceLocation": "https://graph.microsoft.com/beta/employeeExperience/communities('eyJfdHlwZSI6Ikdyb3VwIiwiaWQiOiIxODQ4MTMxNTAyMDgifQ')",
"operationType": "createCommunity",
"resourceId": "eyJfdHlwZSI6Ikdyb3VwIiwiaWQiOiIxODQ4MTMxNTAyMDgifQ"
}
CTRL + M