Graph API: Get presence endpoint can't return "OutOfOffice" value

Ari Gunawan 0 Reputation points
2024-02-12T08:42:54.8733333+00:00

I'm attempting to retrieve presence information using the Graph API: https://learn.microsoft.com/en-us/graph/api/presence-get?view=graph-rest-1.0&tabs=http

While I can accurately retrieve values for when a user is available, away, busy, do not disturb, etc., there's an issue with out-of-office status.

Even when a user sets their status to out of office, the Graph API still returns either available or away. It seems that there's no scenario where the Graph API returns "out of office" for the activity value.

Below is my current user status: User's image

  • When my status is "out of office - away," I receive the following response from the get presence endpoint: User's image
  • When my status is "out of office - offline," I receive the following response from the get presence endpoint: User's image

I believe the response should indicate "out of office" in these scenarios - based on the possible values on the documentation: User's image

Microsoft Teams | Development
Microsoft Teams | Development
Building, integrating, or customizing apps and workflows within Microsoft Teams using developer tools and APIs
Microsoft Security | Microsoft Graph
Microsoft Teams | Microsoft Teams for business | Other
{count} votes

2 answers

Sort by: Most helpful
  1. CharanyaB-MSFT 1,891 Reputation points
    2024-02-13T01:44:59.62+00:00

    Hi @Ari Gunawan ,

    Thanks for reaching Microsoft.

    I have tried to replicate this issue and I was able to see similar behavior with this Graph API.

    I would recommend you to raise a support case with Microsoft Graph, a Support Engineer will be able to assist you better. You can raise support ticket from New support request - Microsoft Entra admin center or https://admin.microsoft.com/#/support/requests.

    API Reference link: https://learn.microsoft.com/en-us/graph/api/presence-get?view=graph-rest-1.0&tabs=http

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.

    0 comments No comments

  2. Prasad-MSFT 10,266 Reputation points Microsoft External Staff Moderator
    2024-02-28T12:57:16.5266667+00:00

    You can now get the out of office message through the Graph Get presence beta endpoint.

    GET /me/presence
    GET /users/{id}/presence
    GET /communications/presences
    

    The beta endpoint response will have an outOfOfficeSettings property in it, that contains the out of office message. Or, you can get it via the mailboxSettings endpoint: https://learn.microsoft.com/en-us/graph/api/user-get-mailboxsettings?view=graph-rest-1.0&tabs=http Thanks,  Prasad Das 


    If the response is helpful, please click "Accept Answer" and upvote it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.