I am aware of the beta Graph Presence API. However, this currently only allows retrieving Presence data. I would like to be able to change a Teams user's status availability using an api call. The most recent information that I could find is several years old: (Does Microsoft Teams have a way to update a user's status/presence?)
If the Teams API does not contain this functionality, can it still be done via the underlying UCWA API if that is still available for Teams? Or, more generally, is there some other way to have an external application update a Teams user's status availability?
Alternatively, is there a way to update the availability/status in Office 365 via an api call?
You can create websites, services, and native platform applications that run outside the Microsoft Teams user experience, and call the Teams API to automate Teams scenarios.
In essence, the Microsoft Teams online availability is in sync with (1) your Outlook calendar appointments/meetings, (2) your activity in the Teams app itself (such as presenting in a meeting or in a Teams call) and obviously (3) the system state – active, sleeping, idle and as such.
For anyone still interested, there's a new API available that allows to set user presence with application permission type.
https://learn.microsoft.com/en-us/graph/api/presence-setpresence?view=graph-rest-1.0&tabs=http
I've tested it and it seems to "mostly" work. I've observed 2 issues:
So although it's in 1.0 version, for me it's still more beta.
Lukasz was correct, only thing is you need to provide bearer token as well in the header for authorization
curl --location --request PUT 'https://presence.teams.microsoft.com/v1/me/forceavailability/' \--header 'Authorization: Bearer your_token_here --header 'Content-Type: application/json' \--data-raw '{ "availability": "Busy"}'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With