Get Presence Teams Graph API updated

I initially tested Get Presence Graph API over a year ago and a revisit showed it has been updated recently. You can now retrieve Out of Office information along with it!

To get started with it easily – and to see how it works – I recommend using Graph Explorer. It allows you to use delegated permissions and play around with Graph API requests & returns. Whenever I work with Graph API I always start with the Graph Explorer. It is a lot faster to tune your calls in it than running a Cloud Flow.

You can see these recent changes in beta version. And easy start is to call it on your self.

First – sign-in to Graph Explorer on the left

GET https://graph.microsoft.com/beta/me/presence

Make sure that you choose that you are testing out with beta version. If you want to test API with 1.0 then choose it from the dropdown.

When you are ready hit “Run query”. And then you will get an error:

You will have to open Modify permissions -tab and give yourself permission to access the information. If you don’t have permission to do this in your work environment then I suggest you test this with a development, trial or demo tenant.

You will need to Consent both.

And then we run the query again

And we got an answer!

Once we set the Out of Office in Microsoft Teams (yes – you can do this in Public Preview now!) we can eventually see the result. It will take some time before it updates to system once you set it in Teams.

What we unfortunately don’t get out of Get Presence API is the status message. And we are not able to set these via API either. Read more & up to date information from Microsoft Docs.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.