APIs for reading activity feed from Microsoft Team

2019-09-22 08:00发布

问题:

Is there any inbuilt APIs available using which we can read notifications from activity feed in Microsoft Teams?

I've gone through Microsoft Teams Developer Platform but didn't find any clue. Any resources with explanation are greatly appreciated.

回答1:

The answer from @mdrichardson-msft would find notifications sent by an app, but only a small fraction of the activity feed would ever match that.

The Microsoft Graph APIs for retrieving the activity feed are on the backlog but they are not yet there, and we don't have a date to share.



回答2:

You'd use the MS Graph API. Unfortunately, it doesn't support directly querying the activity feed.

I can't test this due to permissions settings, but I think you can:

  1. Query all messages from the relevant chat or channel

  2. You would then have to filter for the ones that have the following json snippet, which is used to send activity feed notifications:

"channelData": {
  "notification": {
    "alert": true
  }
}