Microsoft recently announced Teams management capabilities through the Microsoft Graph API. Graph is a RESTful API that can be called to manage many of Microsoft cloud services. For example, you can write an application or a scheduled PowerShell script that calls Graph to manage Azure AD, Office 365 and Intune, all through the same API. The Microsoft Graph API for sending notifications in the Microsoft Teams Activity Feed is now generally available with enhanced features. Hi there, We're currently looking at a project that may integrate Dynamics 365 with MS Shifts and we're wondering if there's any way to get access to the Graph API for MS Shifts/Teams? Thank you in advance, Matt. Now for Microsoft Teams and Skype for Business online, there is the call records API. A Graph webhook API that will give access to this information. In March this entered public preview and was accessed under the /beta Graph API but is now in Graph v1.0. There are 2 versions of Microsoft Graph REST APIs – v1.0 and beta. API’s under /beta are preview status and are subject to change and may break existing scenarios without notice.



APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.

Microsoft Teams is a chat-based workspace in Microsoft 365 that provides built-in access to team-specific calendars, files, OneNote notes, Planner plans, Shifts schedules, and more.

Key resources in Microsoft Teams

teamList your teams, list all teams, create, read, update, delete, clone, archive, unarchive
groupAdd member, remove member, add owner, remove owner, get files, get notebook, get plans, get calendar
channelList, create, read, update, delete
teamsTabList, create, read, update, delete
teamsAppList, publish, update, remove
teamsAppInstallationList, install, upgrade, remove
chatMessagelist in channel, list in chat, send, read in channel, read in chat
callAnswer, reject, redirect, mute, unmute, change screen sharing role, list participants, invite participants
scheduleCreate or replace, get, share
schedulingGroupCreate, List, Get, Replace, Delete
activityFeedNotificationSend notification to user in scope of a chat, Send notification to user in scope of a team, Send notification to user in personal scope
shiftCreate, List, Get, Replace, Delete
timeOffCreate, List, Get, Replace, Delete
timeOffReasonCreate, List, Get, Replace, Delete

Microsoft Teams limits

The tested performance and capacity limits of Microsoft Teams are documented inLimits and specifications for Microsoft Teams.These limits apply whether using Microsoft Teams directly or using Microsoft Graph APIs.Because every team has a corresponding group, and every group is a directory object,limits on the number of groupsand the number of directory objects ('resources')can also come into play.

Files inside channels are stored in SharePoint; SharePoint online limits apply. Xampp php 6.

See also throttling limits for Microsoft Teams services.

Teams and groups

In Microsoft Graph, Microsoft Teams is represented by a group resource. Both Microsoft Teams and Microsoft 365 groups address the various needs of group collaboration. Almost all the group-based features apply to Microsoft Teams and Microsoft 365 groups, such as group calendar, files, notes, photo, plans, and so on. The main difference between a team and a Microsoft 365 group is the mode of communication between members. Team members communicate by persistent chat in the context of a specific team. Microsoft 365 group members communicate by group conversations, which are email conversations that occur in the context of a group in Outlook.

Any group that has a team has a resourceProvisioningOptions property that contains 'Team'.

Note: The Group.resourceProvisioningOptions property can be changed.Do not add or remove 'Team' from that collection;otherwise, you'll get incorrect results when you list all teams.

The following are the differences at the API level between teams and groups:

  • Persistent chat is available only to Microsoft Teams. This feature is hierarchically represented by the channel and chatMessage resources.
  • Group conversations are available only to Microsoft 365 groups. This feature is hierarchically represented by the conversation, conversationThread, and post resources.
  • The List joined teams method applies only to Microsoft Teams.
  • Calling and online meeting APIs apply only to Microsoft Teams.
  • See also the known issues for these APIs.

Note: If you use the groups API in a Microsoft Teams app rather than in a standalone app - for example as part of a tab or bot running in Microsoft Teams - follow the guidance in the article Using Microsoft Graph in your Microsoft Teams pages.

Membership changes in Microsoft Teams

Graph Api Teams Create

To add members and owners to a team, change the membership of the group with the same ID.

Use caseVerbURL
Add memberPOST/groups/{id}/members/$ref
Remove memberDELETE/groups/{id}/members/{userId}/$ref
Add ownerPOST/groups/{id}/owners/$ref
Remove ownerDELETE/groups/{id}/owners/{userId}/$ref
Update teamPATCH/teams/{id}

We recommend that when you add an owner, you also add that user as a member.If a team has an owner who is not also a member, ownership and membership changes might not show up immediately in Microsoft Teams.In addition, different apps and APIs will handle that differently.For example, Microsoft Teams will show teams that the user is either a member or an owner of, while the Microsoft Teams PowerShell cmdlets and the /me/joinedTeams API will only show teams the user is a member of.To avoid confusion, add all owners to the members list as well.

Known issue: when DELETE /groups/{id}/owners is called, the user is also removed from the /groups/{id}/members list. To work around this, we recommend that you remove the user from both owners and members, then wait 10 seconds, then add them back to members.

When adding and removing members and owners, don't put braces { } around the ID.


Similarly, if the userId in the URL or payload is expressed as a UPN rather than as a GUID, the performance will be slower.


When the slower path is taken, if a current team member or owner is signed in to the Microsoft Teams application/website, the change will be reflected within an hour.If none of those users are signed in to the Microsoft Teams application/website, the change will not be reflected until an hour after one of them signs in.


Tenant guests are always processed via the slow path.

Polling requirements

If your app polls to see whether a resource has changed, you can only do that once per day.(teamsAsyncOperation is an exception in that it's intended to be polled frequently.)If you need to hear about changes more frequently than that, you should create a subscription to that resource and receive change notifications (webhooks).If you don't find support for the type of subscription you need, we encourage you to provide feedback via UserVoice.

When polling for new messages, you must specify a date range where supported. For details, see get channel messages delta.

Graph Api Teams

Polling is doing a GET operation on a resource over and over again to see if that resource has changed.You're allowed to GET the same resource multiple times a day, as long as it's not polling.For example, it is okay to GET /me/joinedTeams every time the user visits/refreshes your web page,but it is not okay to GET /me/joinedTeams in a loop every 30 seconds to refresh that web page.

Apps that don't follow these polling requirements will be considered in violation of theMicrosoft APIs Terms of Use. This may result in additional throttlingor the suspension or termination of your use of the Microsoft APIs.

What's new

Find out about the latest new features and updates for this API set.

Graph Api Teams Chat Messages

See also

Graph Api Teams Channel

  • Sample code: Contoso Airlines, C# mini-samples