Microsoft Teams : REST APIs - rest

I'm interested in getting data (metadata and content of files) out of Microsoft Teams into my application using REST APIs. I have looked at Office 365 APIs and Graph APIs but, I could not find supporting documentation for Microsoft Teams.

Teams API is now added to beta endpoint in Microsoft Graph. In documentation, you can find it together with Groups. Post, Channel and Chat Thread are available.
For example, documentation for "channel" resource is here:
https://developer.microsoft.com/en-us/graph/docs/api-reference/beta/resources/channel

Microsoft Teams REST API is now included into MS Graph API
https://learn.microsoft.com/en-us/graph/api/resources/team?view=graph-rest-1.0
At the time of writing this answer there are not too many APIs around Teams. However more are being added and they are in Beta (sending messages, adding apps to team, uploading team image, and more).
https://learn.microsoft.com/en-us/graph/api/resources/team?view=graph-rest-beta
It is not recommended to use Beta APIs in production environment as they might change.
It is also worth of mentioning that Teams are actually Office365 Groups.

Please take a look at Graph API
https://learn.microsoft.com/en-us/graph/api/resources/team?view=graph-rest-1.0
https://learn.microsoft.com/en-us/graph/api/resources/team?view=graph-rest-beta
Expand "Teamwork" at left side, you can get all Teams related API

We do not have Teams APIs available at this time. Our extensibility options are limited to experiences within the Teams application.

The Microsoft Graph API is constantly changing and we're currently using the following to monitor/interact with our Microsoft Teams application:
https://learn.microsoft.com/en-us/graph/api/resources/teams-api-overview
It gives access to the following (at the time of writing this):
We also monitor the general usage via the reports section in the Graph API:
This gives access to:
Device Usage:
Get details about Microsoft Teams device usage by user.
Get the number of daily unique users by device type.
Get the number of unique users by device type over the selected time period.
User Usage:
Get details about Microsoft Teams user activity by user.
Get the number of Microsoft Teams activities by activity type. The activities are performed by Microsoft Teams licensed users.
Get the number of users by activity type. The activity types are number of teams chat messages, private chat messages, calls, or meetings.
https://learn.microsoft.com/en-us/graph/api/resources/microsoft-teams-device-usage-reports?view=graph-rest-1.0

Related

How to send notifications to specific users in Microsoft Teams (across multiple teams) from an external api

I want to notify (can be activity feed or 1:1 chat) specific users in Microsoft Teams via an external api. The teams can be of different organizations. I looked into the docs as well, but couldn't figure out the solution. Is this even possible?
Yes, this is definitely possible - it requires you to build a bot to enable pro-active messaging. There are actually a few different approaches and API options for doing this, but I've got a very comprehensive example of one of the approaches, that includes a .Net and a Node.js sample, at https://github.com/HiltonGiesenow/teams-dev-samples/tree/add-proactive-messaging-sample/samples/bot-proactive-messaging. There are links at the bottom of the page to various additional readings as well for more info.

How can we collect the facebook group request data using a chrome extension?

Is there any way that we can collect data by asking the questions when someone wants to join the group. And we collect the data when we approve the joining request or sometimes programmatically?
Could you please elaborate on how we can use Facebook GRAPH API for fulfilling the above purpose?
Check out GroupTrack CRM...it's a CRM that is integrated into Facebook via a Chrome Extension. It does exactly what you asked (one click to approve individual or all pending members while also saving their answers to your questions and adding them to the CRM), along with a ton of other awesome stuff.
Keep notes and tags, track sales funnel stages, bookmark posts and comments, set follow up tasks with reminders, and more across unlimited Groups. Everything is synced in real time with a web app as well, so you can access your contact information from anywhere, plus it can be set up to integrate with external systems (Google Sheets, Streak, and Kartra at the moment, but many more to come).
Lastly, GroupTrack supports teams, so if you run a Group with other admins, you can share access to the CRM and have everything kept in sync. It's awesome!

How can you set Skype for Business status when in a Teams call automatically?

I've hit a wall so I'm asking my favorite community. I created custom Skype for Business activity statuses for Teams so when you are in a Teams call, you can manually set your status in SfB to "In a Teams Call". After searching for many days, i still have not found a way to auto set this status. Is there maybe a plugin for SfB or a service to run for this feature? This is for SfB (On-Prem). I primarily script in PowerShell but any guidance would be very appreciated.
#John, Microsoft Teams replaces Skype for Business Online as Microsoft’s professional online meeting solution. For more information on this please check this document.
To get/set up user status, you can use Presence Graph API's. For more information on Presence Graph API, please check this API docs
I created a windows service to check my Teams presence using the Graph API. If it returns InACall, I use Skype for Business Modules to set my activity to In-A-Call.
Sample code:
https://schmalhorstorg.blogspot.com/2020/04/powershell-set-skype-for-business.html

Azure DevOps and Teams - one Group group to control membership to both

I have been trawling the internet and clicking myself blue in the face! Hopefully someone has a definitive answer.
I want to have one Group (in either of Azure AD, Microsoft Teams or Azure DevOps). This group must have access to a DevOps project and a Team site. When I change the membership of the group, the membership must change for both the Team and the DevOps project. I want to avoid the overhead of managing the groups for both separately.
Is this at all possible? Thanks.
This is a really good question, and the answer is not obvious at all. Ironically we had the same exact problem in Microsoft Teams - when a user was added or deleted from the underlying Office 365 Group (which is mastered in Azure AD), it would take up to an hour, sometimes more, to be reflected in Teams, which has its own copy of the member list.
There is a way to do it, and it's how Teams does it: it relies on a relatively new feature in Microsoft Graph called subscriptions. You can find the documentation for it here: https://learn.microsoft.com/en-us/graph/api/resources/subscription?view=graph-rest-1.0.
Essentially what you want to do is create a subscription to the group: POST https://graph.microsoft.com/v1.0/subscriptions with the right message body and your endpoint will be called whenever there's a membership change in the group. Your endpoint won't know what changed, just the event and some IDs - you will likely have to make a separate call to retrieve the actual data (unless the IDs alone are sufficient).
There's a sample on GitHub that illustrates how to use Microsoft Graph subscriptions including more details on how to subscribe to group notifications specifically.
One thing to be aware of is that to use these APIs, your application will require fairly elevated permissions: Group.Read.All which means it has the ability to read not only the team/group members, but all of its messages too (among other things), for every group in your Office 365 tenant. We are working with the MS Graph team to support a less-privileged, per-group permission approach, but even after that's released for Teams Graph APIs, support for that will have to be added to the subscriptions APIs I just mentioned and that may not happen for a while.

where are questions for a Microsoft Azure QnA bot stored?

I run a QnA bot (Animal-Rights-Bot) that answers questions via skype or email but there is a discrepancy between the number of questions shown in the Azure dahsboard and the bot mailbox. I`m wondering where I find those questions that were sent to the bot in Skype and per Mail.
You get all the chatlogs from QnAMaker in the test tab on the portal. There is a download chat logs link.
Every knowledge base content is stored in Azure storage by the QnAMaker tool. You need a combination of knowledge base id and subscription key to access the knowledge base. The knowledge base contents are not used by the tool for any other purpose.
Here is the API reference documentation for the the QnA maker . you can use them to programmatically query the knowledge base.
https://qnamaker.ai/Documentation/ApiReference