Hi guys,
I would like to start providing some contributions to your project. This is the first time for me here and was wondering if you are interested to get some commands in the Yammer space as you already did for the Outlook section.
I thought I am going to start with a simple Yammer post command first.
Is this something you might be interested in?
Best regards,
Patrick
Of course! On behalf of the team, I appreciate you reaching out and offering help.
Typically, before we start building a command, we agree on its spec. Since you proposed the command, would you like to give it a shot? You can find an example of an issue with a command spec here: https://github.com/pnp/office365-cli/issues/1042. To help you understand how commands work and what's included, we put together some guidance here. Once again, thank you for reaching out and please, don't hesitate to ask any questions. 馃憤
This command will post a message on behalf of a user. I am going to implement the basic parameters first. It can be extended in a second-round if required.
yammer message add --body "my body" --replied_to_id 1231 --direct_to_user_ids 12,11 --group_id 123123 network_id 123123
I am taking the details from https://developer.yammer.com/docs/messages-json-post.
I am going to return the ID of the created message if the output method is not JSON. If the output method is JSON I am going to return the whole JSON object returned by Yammer.
Yammer is usually returning an array of objects even if we just have one entry. I am going to manipulate this to return a unique object.
If the way the command gets implemented is fine for you, I am going to start with this command first to get used to your process. I am going to implement some more commands in this area. For this, I am going to create new issues.
Thank you,
Patrick
Thanks for the proposal. From the end-user point of view, how would the user know the IDs of the message to reply to, users, group or network? I'm afraid, that without offering a way to obtain these IDs first, this command will not be used much.
Good point. My aim was to provide more endpoints. I suggested in #1107 to return and search for users by id and e-mail. If you want, I can build that one first.
My code is ready for this solution. Should I just create both commands and submit one PR?
We should also consider returning all users in a Yammer network. #1113
Since Yammer is a new area, I'd suggest that we start on top of the hierarchy with commands for listing networks, users and other top-level objects which are necessary to perform other actions like posting messages,
On a related note, have you looked into Yammer auth and if there are any changes required for us to be able to connect to Yammer before we can implement any Yammer command?
Hi,
My suggestion is to follow this approach.
You need to add the delegated Yammer permissions in Azure AD to make it work with the CLI.
If you want to have a call to go through the discussion to speed up the process, let me know.
br,
Patrick
Makes sense. Let's start with network listing and take it from there. While working on it, you can use a custom AAD app so that you don't need to wait on us updating the CLI AAD app with the necessary permissions. Once you submit a PR we can then update the CLI AAD app so that everyone can use the command.
Fine. Will start with the work
Most helpful comment
This command will post a message on behalf of a user. I am going to implement the basic parameters first. It can be extended in a second-round if required.
yammer message add --body "my body" --replied_to_id 1231 --direct_to_user_ids 12,11 --group_id 123123 network_id 123123
I am taking the details from https://developer.yammer.com/docs/messages-json-post.
I am going to return the ID of the created message if the output method is not JSON. If the output method is JSON I am going to return the whole JSON object returned by Yammer.
Yammer is usually returning an array of objects even if we just have one entry. I am going to manipulate this to return a unique object.
If the way the command gets implemented is fine for you, I am going to start with this command first to get used to your process. I am going to implement some more commands in this area. For this, I am going to create new issues.
Thank you,
Patrick