Hello,
I would like to get the last posts in a Teams channel and the replies to each post. How can I do that?
I get the parent posts with "Get Messages", but after that I don't know how to get its replies...
Thank you very much for your help.
Solved! Go to Solution.
I just finished up doing this exact thing with great success!
Myself and a colleague would pass the Team ID and the Channel ID and the Message ID into a flow. Within the flow we used the O365 Groups connector. It has an action that is to send an HTTP request. We used the Graph API within this field. It would look something like this:
We'd then parse the JSON and send the data out. The benefit to this is that it does not require elevated permissions to use the Graph API. I'm not sure how it works but when we run this GET in Graph we get a Forbidden error, but when we do it through this connector we get our replies. Hope this helps!!!
You could try the GRAPH API.
Hi @SudeepGhatakNZ .
Thank you for your reply. In my company we don't have authorization to use the Graph API. Do you know any other option to do this?
Thank you.
I am sorry, not using flow.
You could try the PnP libraries using JS
message reply list - CLI for Microsoft 365 (pnp.github.io)
Also, I can't use external libraries (I can't make the necessary authentication).
I just finished up doing this exact thing with great success!
Myself and a colleague would pass the Team ID and the Channel ID and the Message ID into a flow. Within the flow we used the O365 Groups connector. It has an action that is to send an HTTP request. We used the Graph API within this field. It would look something like this:
We'd then parse the JSON and send the data out. The benefit to this is that it does not require elevated permissions to use the Graph API. I'm not sure how it works but when we run this GET in Graph we get a Forbidden error, but when we do it through this connector we get our replies. Hope this helps!!!
Thank you very much.
Worked perfectly!!!
User | Count |
---|---|
92 | |
43 | |
20 | |
19 | |
15 |
User | Count |
---|---|
135 | |
54 | |
44 | |
41 | |
31 |