The Yammer REST Api allows you to return messages through the interface described here. A call to that API returns a batch of 20 messages that can be limited to fewer messages with the limit operation. The drawback is that you can’t ask for the last 500 messages without making multiple calls to the API.

Therefore, I created a PowerShell snippet that is doing the necessary Yammer API calls to return you the exact number of messages you would like to have. You can use this snippet as example on how you might handle other similar operations.

You can generate the baerer token (access token) as described in this post.

Always consider the REST API and Rate Limits when accessing a Yammer network.

comments powered by Disqus