Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New command: viva engage community set #6279

Open
MartinM85 opened this issue Aug 28, 2024 · 12 comments · May be fixed by #6283
Open

New command: viva engage community set #6279

MartinM85 opened this issue Aug 28, 2024 · 12 comments · May be fixed by #6283

Comments

@MartinM85
Copy link
Contributor

MartinM85 commented Aug 28, 2024

Usage

m365 viva engage community set [options]

Description

Updates an existing Viva Engage community

Options

Option Description
-i, --id [id] The id of the community. Specify either id, displayName or entraGroupId, but not multiple.
-d, --displayName [displayName] The name of the community. Specify either id, displayName or entraGroupId, but not multiple.
--entraGroupId [entraGroupId] The id of the Microsoft Entra group associated with the community. Specify either id, displayName or entraGroupId, but not multiple.
--newDisplayName [newDisplayName] New name for 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.

Examples

Update info about the community specified by the community id

m365 viva engage community set --id eyJfdHlwZSI6Ikdyb3VwIiwiaWQiOiI0NzY5MTM1ODIwOSJ9 --newDisplayName 'Developers' --description 'Community for all devs' --privacy public

Update info about the community specified by name

m365 viva engage community set --displayName 'Developrs' --newDisplayName 'Developers'

Update info about the community specified by the Microsoft Entra group id

m365 viva engage community set --entraGroupId 0bed8b86-5026-4a93-ac7d-56750cc099f1 --newDisplayName 'Developers' --description 'Community for all devs' --privacy public

Default properties

No response

Additional Info

API
https://learn.microsoft.com/en-us/graph/api/community-update?view=graph-rest-1.0&tabs=http

@milanholemans
Copy link
Contributor

Hi @MartinM85, to improve friendliness, I suggest that we use 2 options displayName and newDisplayName.
Same question here. Do you want to work on it, or should we open it up?

@MartinM85
Copy link
Contributor Author

@milanholemans Spec updated. I can take it

@Jwaegebaert
Copy link
Contributor

Thinking a bit more about this command, how about we add an option for --groupId? It might be more informative to update a community using its groupId rather than communityId. What do you think, @milanholemans, @MartinM85?

@milanholemans
Copy link
Contributor

In that case, shouldn't people just use the entra m365group commands? If you change the description, display name or privacy there, it should sync to Viva Engage as well.

@Jwaegebaert
Copy link
Contributor

That’s a good point, but I’m not sure everyone would know that. If you’re working within the viva engage command space, they might not think to check Entra commands. It’s a bit of an edge case, so I’m not sure if it’s worth the effort 😄.

@milanholemans
Copy link
Contributor

We should also strive for consistency. This means that when we add this option to one command, we should add it to all viva engage commands. I'm not sure if this is feasible, for the viva engage community get command for example, we are unable to use the Viva Engage APIs when we only have the group ID.

@Jwaegebaert
Copy link
Contributor

It would be a bit of a workaround to get it working with just the groupId, but not impossible. If we have a way to do it, might be useful to add the method to a central util for the community commands since I also specced out the user commands with groupId. Alternatively, we could just remove them from the spec and we can stick with communityId and communityName. I'm good with either.

@MartinM85
Copy link
Contributor Author

I would start with the version without the groupId.

@milanholemans
Copy link
Contributor

@Jwaegebaert maybe we should agree on whether we user groupId or not before reviewing:

I can live with both stances to include it, or not. But IMO if we include it, we should name it entraGroupId to make it a bit more clear. What do you think @pnp/cli-for-microsoft-365-maintainers?

@Adam-it
Copy link
Contributor

Adam-it commented Sep 10, 2024

I also don't have a strong opinion about the group option as long as it is somehow clear, either in option name like @milanholemans mentioned to use entraGroupId, or in option description. Other than that I think we may add such an option if possible 👍

@Jwaegebaert
Copy link
Contributor

Would entraGroupId make it clearer? The community groups are strictly M365 groups, and while M365 is part of all types of Entra Groups, using entraGroupId wouldn’t add much clarity. The description already specifies that it only accepts M365 groups.

@MartinM85
Copy link
Contributor Author

Ok, spec updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants