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
- gieri07Copper Contributor
Upvoting. We are working on MS Teams integration tool and we would love to have this feature implemented.
- JegerCopper ContributorSorry to bother you, but do we have an update on this requested feature?
- AtmcqCopper Contributor
Upvoting. Our app is a case management tool, allowing emails to be sent to and from cases being managed. We’d like the app to be able to check the presence status of a user that a case is assigned to so that it can generate an out of office message if someone emails a case when the owner is away. We can’t find a way of doing this with delegated permissions.
- robert_anywhereCopper Contributor
They could clarify that themselves by simply responding to this thread.
- DanielArkleyCopper Contributor
jh7459 I'm not sure why you have asserted that Microsoft don't want people accessing Teams data through APIs for fear of people using this capability to build a competitor product... Surely if we're relying on the APIs, Microsoft would still benefit from people having to pay to access the service in the first place to be able to set presence data or whatever else people want to do with the API. It's not like using the API can circumvent license fees...
I think a less cynical thought process might be that Microsoft are more than happy for us to access data (otherwise they wouldn't have created the Microsoft Graph), and they're more than happy for us to access presence data (otherwise they wouldn't have created the ability to do so with delegate permissions), they just have some kind of technical impediment that means it's hard to do with application permissions and they don't want to spend the time fixing technical debt unless enough people get behind the request.
I don't know how repeatedly suggesting the same "Microsoft don't want you to have access to the data", "Once a monopoly, always a monopoly" etc... contributes anything useful to this thread. Other contributors are trying to suggest ways in which application permissions to read/write Teams presence data would be useful to them. One has also suggested that a new API permission has appeared but doesn't work as they might have expected. In my mind this shows either an uncanny coincidence, or perhaps that Microsoft are actually working on implementing what the community very clearly want to see.
As a final thought on the matter, have you heard of Azure Communication Services, a service offering by Microsoft that exposes the same platform used by Teams to allow the development of applications that use voice calling, video calling SMS, and other such communication experiences? If ever there was an indication that Microsoft are opening up, rather than closing us out, this would have to be it.
I hope that eventually the app permissions for presence will be introduced and help reassure you that Microsoft have changed - they're not now the business that they once were. There's much more work on standards, open APIs, collaboration with the open source community, focus on cross-platform - in my opinion, they're more open than they've ever been.
- Simon_ThorntonCopper Contributor
Another app-only use case: I have a simple daemon app to check the welfare of home office workers (during the Covd pandemic). The app uses last network login times and posts a daily message on Teams to team leaders about any user who hasn't logged in today, so they can be checked up on. However, users may still be logged in from a previous day, so this generates many false alarms. It would be much more convenient if the app could use the Graph Presence API to check before reporting someone missing. It should not require a specific user to perform this check, because (a) the app serves multiple team leaders, and (b) that just wastes time.
Hence I'm up-voting this topic.
- jh7459Copper Contributor
Because if an Application could read such status, you could standup your own teams-type GUIs. I believe their business model is to remove all such API to drive people into their app. Once a monopoly always a monopoly.
- ericrrichardsIron Contributor
It appears that there is now an Application level presence permission, Presence.ReadWrite.All.
Unfortunately, it can't be used to actually read presence, only write presence status...
Ideally, one would use the change notification webhook model (https://docs.microsoft.com/en-us/graph/webhooks#firewall-configuration) to subscribe to presence changes, but that's really not workable when Delegated permissions are the only option for getting presence information.
- JegerCopper Contributor
robert_anywhere thanks for the info, that must be the case. I probably had that info from before the presence API, due to it being linked in the teams service limits, in the throttling guidance: https://docs.microsoft.com/en-us/graph/throttling#microsoft-teams-service-limits
- robert_anywhereCopper Contributor
Thanks Jeger . However, that remark is under the 'Teamwork'-node. This discussion is about presence information, which is retrieved using the APIs mentioned under the 'cloudcommunications'-node in the documentation. There is no such remark there:
https://docs.microsoft.com/en-us/graph/api/cloudcommunications-getpresencesbyuserid?view=graph-rest-beta&tabs=http