Graph API Presence should support Application permissions
Currently only delegated user permissions are supported, and this is very sub-optimal for bots and service applications that need to monitor Teams presence of users.
89 Comments
- JegerCopper Contributor
https://docs.microsoft.com/en-us/graph/api/resources/teams-api-overview?view=graph-rest-1.0#polling-requirements
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 the Microsoft APIs Terms of Use . This may result in additional throttling or the suspension or termination of your use of the Microsoft APIs.
- robert_anywhereCopper Contributor
Jeger "and according to the documentation: it's a bannable offence" - Where did you find this?
- JegerCopper Contributor
We route calls based on presence status, for our customers. Polling MS Graph API for Teams presence status with tens of thousands of users in multiple AD's, is not a feasible solution and according to the documentation: it's a bannable offence.
It would be great to have the ability to use the subscription API with the client credentials grant. Would be a considerable boost for us developers and our customers, to not have a complex authentication process.
jh7459I doubt that is the case, there are plenty of businesses who do not want to migrate from Skype to Teams, just because of lack of functionality or API support. This is mostly due to limited resources (time, personnel) and design choices.
- jh7459Copper Contributor
I'll be totally cynical and assert that MS is blocking app read-access because they don't want anything competing with MSTeams - deliberately driving people that their app is the only choice for such data.
I believe they are blocking the 'status message' for the same reason
They are such obvious use-cases it much be deliberate
- grumpykiwiCopper Contributor
OK found some docs:
https://docs.microsoft.com/en-us/graph/api/presence-setpresence?view=graph-rest-beta&tabs=http
https://docs.microsoft.com/en-us/graph/api/presence-clearpresence?view=graph-rest-beta&tabs=http
Docs mention in a callout flagged as important:
Provide the ID of the application as sessionId in the request.
Is it asking for the Teams App ID? Clicking around in the Azure portal, it seems to be 1fec8e78-bce4-4aaf-ab1b-5451cc387264.
My goal is this. I have written an app that retrieves the presence for all users in a specified AD group and displays them in a list on a tab within Teams. Management want the ability to set the presence of a specific user when they go on vacation for example and forget to set their presence accordingly. Specific people would be provided the ability to essentially override the displayed presence.
The C# example has a hard coded session ID. Obviously I need to replace that value, but with what?
Any help always appreciated
- grumpykiwiCopper Contributor
Can you provide a link to any documentation on this? Not seeing anything in Graph Explorer so far. Will keep looking

- JLindleyCopper Contributor
Looks like the /beta Graph API now supports Clearing and Setting a users presence but still no support for Getting the users presence for Applications. Only delegated is supported but this is not viable for enterprise applications.
- BradBamfordCopper Contributor
Another upvote, application needs the ability to GET user presence.
- grumpykiwiCopper Contributor
We have a employee status app for Slack that lists all employees and their current status on a web page using the Slack presence API.
We are moving to Teams since we are already an O365 E5 subscriber.
Management rely heavily on employees using the custom status feature of Slack and would like to see that in Teams. This feature enables employees to give a more detailed status than the canned available, busy, out of office etc,
Also, the ability for one or more designated senior staff to be able set someone's status in their absence would be good. We frequently have employees go on PTO and forget to set their status appropriately. Would be handy for the CFO to be able to override to accurately reflect where someone is or is not
- ryanbueningCopper Contributor
We have a chat app where we want to display our internal employees Team status to our customers. This would let the customer know if the employee is available to chat. Currently, we have our employees manually set a status which gets displayed in the chat app. We also have a Teams bot setup that sends a Teams message to the employee when the customer wants to chat.
The application permission for get presence would allow us to use their Teams status in our custom chat app which would greatly simplify things.