Customize Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorized as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... 

Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

No cookies to display.

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

No cookies to display.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

No cookies to display.

Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.

No cookies to display.

Advertisement cookies are used to provide visitors with customized advertisements based on the pages you visited previously and to analyze the effectiveness of the ad campaigns.

No cookies to display.

Pages Menu
TwitterRssFacebook

Posted by on Dec 11, 2020 in Development, Microsoft Teams

New in Microsoft Graph: API calls to get EVERYTHING a user sent in Chat, All Chats in Channels, and support for Apps in Chat

New in Microsoft Graph: API calls to get EVERYTHING a user sent in Chat, All Chats in Channels, and support for Apps in Chat

It’s been a busy week for adding new Microsoft Teams functionality to Microsoft Graph, and also for graduating beta functionality to 1.0. Here’s a roundup of what’s new – including new functionality for managing apps, and new ways to get ALL chat data about a user or a channel.

Promoted to 1.0

These calls are all about programmatically working with apps in Microsoft Teams. Some of these calls were in beta before and some look to have jumped straight to 1.0 (but I’m not certain of that).

There is support for adding and removing, listing and upgrading. With these APIs, this should really improve the experience of users in enterprises because it will enable admins to grant permission to apps to install themselves as needed, rather than requiring users to manually choose them from the Store.

What is really good to see is that the permission scopes of these calls are both granular and specific, such as in this call to retrieve information about an app installed in a team:

The full list of new API calls in 1.0 are:

New to beta: Apps & Tabs in Chat

There are new APIs to support both apps & tabs in chat. It’s good to see these added to the API lineup and bringing the same functionality to apps in chat, as are in channels:

List apps in chat
Get installed apps in chat
Add app to chat
Uninstall app from chat
Upgrade installed app in chat

List tabs in chat
Get tab in chat
Add tab to chat
Remove tab from chat
Update tab in chat

New to beta: Get All Messages API Calls

There are two new API calls in beta now, which will be of interest to anyone trying to parse all information about a user’s chat behaviour, or all the conversations happening in a channel.

Get All Chat Messages

This call gets all messages from all chats that a user is a participant in, including one-on-one chats, group chats, and meeting chats.

It requires Chat.Read.All or higher, and is a Protected API call.

The API call supports using oData to filter on the lastModifiedTime being between two values.

Usage:

GET /users/{id}/chats/getAllMessages

More: Get all chat messages

Get All Channel Messages

This call gets all messages across all channels in a team including text, audio, and video conversations.

It requires the ChannelMessage.Read.All permissions and is a Protected API call.

There are currently no OData parameters you can use with this call, meaning it will return all messages in all channels in the team.

Usage:

GET /teams/{id}/channels/getAllMessages

More: Get messages across all channels

Written by Tom Morgan

Tom is a Microsoft Teams Platform developer and Microsoft MVP who has been blogging for over a decade. Find out more.
Buy the book: Building and Developing Apps & Bots for Microsoft Teams. Now available to purchase online with free updates.

Post a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Share to Microsoft Teams