Cli-microsoft365: New command: yammer group user add

Created on 5 Apr 2020  路  4Comments  路  Source: pnp/cli-microsoft365

Usage

yammer group user add [options]

Description

Adds a user to a Yammer Group.

Options

| Option | Description |
| ----------------------- | ----------------------------------------- |
| --id <id> | The Group ID to process
| --userId [userId] | Adds the user with the specified ID to the Yammer Group. Defaults to the current user
| --email [email] | Adds the user with the specified e-mail to the Yammer Group

Additional information

Join the group specified by the group_id. If neither user_id or email is provided then the user that is currently authenticated will be added to the group.

If the email does not correspond to an existing user, the service will return a HTTP 400.

Implements this endpoint

Just assign it to me

new feature work in progress

Most helpful comment

@garrytrinder had a nice suggestion to name this command yammer group user add to keep it in sync with the remove command. Thank you for thinking with us to keep up consistency 鉂わ笍

All 4 comments

@waldekmastykarz based on our discussion about the leave command I assume it would be better suited to change this command to "add"

@garrytrinder had a nice suggestion to name this command yammer group user add to keep it in sync with the remove command. Thank you for thinking with us to keep up consistency 鉂わ笍

@waldekmastykarz: unfortunately the command does not behave as expected. The official documentation states that if a user is not a member of the yammer network, an invitation is going to be sent. This is not the case. It only returns a HTTP 400 error message.

Since I do not know if the HTTP 400 error message is thrown due to this use case or something else, I am just going to return the HTTP 400 error message without further processing.
I will state this in the documentation. I am not going to try to interpret the error in the code.

Is this approach fine for you?

Yes, let's do that for now. If need be, we can optimize it later. Appreciate you looking into it 馃憤

Was this page helpful?
0 / 5 - 0 ratings