Skip to content

New command: viva engage community add #5753

@milanholemans

Description

@milanholemans

Usage

m365 viva engage community add [options]

Description

Creates a new community in Viva Engage

Options

Option Description
--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, and private.
--adminEntraIds [ownerEntraIds] 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.

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

Default properties

No response

Additional Info

API

https://learn.microsoft.com/en-us/graph/api/employeeexperience-post-communities?view=graph-rest-beta&tabs=http

The API returns a URL which you can poll to check the status of the community.
I suggest that without the --wait flag we just return nothing. When --wait is specified, we return the community object on completion.

Without --wait:

https://graph.microsoft.com/beta/employeeExperience/engagementAsyncOperations('3a6fdce1-c261-48bc-89de-1cfef658c0d5')

With --wait:

{
    "id": "eyJfdHlwZSI6Ikdyb3VwIiwiaWQiOiI0Mjg1NzkwNjE3NyJ9",
    "displayName": "Financial Advice for Software Engineers",
    "description": "A community where financial advisors who represent customers from software engineering profession can discuss advice and suggestions for their clients.",
    "privacy": "public",
    "groupId": "36c434cc-7d12-4280-9849-08da93548c7c"
}

Remarks to be included in docs

  • Warning that API is in beta and is subject to change
  • It is limited to networks in Native mode only – legacy and external Yammer networks will not be able to use this API for community creation.
  • Creating a community will create a linked Microsoft 365 unified group as well.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions