MS Teams Presence Sync Transitions

Tenneti Sudheer Kumar 20 Reputation points
2026-06-30T06:34:32.8333333+00:00

We are building a bidirectional presence synchronization between our telephony platform and Microsoft Teams.

During testing with setPresence, we observed that:

  • Available → Busy works.
  • Busy → Available works.
  • We cannot set Away or DoNotDisturb.
  • We cannot override a manually selected Teams status (Away/Busy/DoNotDisturb) back to Available.

Is this expected behavior due to Teams presence aggregation and precedence?

If our goal is to synchronize telephony status (Available, Busy, DND, Away), should we use setPresence or setUserPreferredPresence? What is Microsoft's recommended API for a telephony integration that needs to reflect call state and DND in Teams?

Microsoft Teams | Development
Microsoft Teams | Development

Building, integrating, or customizing apps and workflows within Microsoft Teams using developer tools and APIs

0 comments No comments

Answer accepted by question author

Michelle-N 18,855 Reputation points Microsoft External Staff Moderator
2026-06-30T09:00:05.83+00:00

Hi @Tenneti Sudheer Kumar

Based on the information you provided, I understand you are building a bidirectional presence synchronization between your telephony platform and Microsoft Teams. You've noticed that while transitioning between Available and Busy works, you cannot set Away or DND, nor can you override a user's manual Teams status back to Available.

In Microsoft Teams, application presence sessions (setPresence) and user-preferred/manual presence (setUserPreferredPresence) are two completely different mechanisms. Here is how the platform architecture handles this and the recommended approach for your telephony integration:

Teams aggregates presence from multiple sources using a strict hierarchy: User-preferred status > Session-level status. Within the session-level hierarchy, the priority order is: DoNotDisturb > Busy > Available > Away.

Available to Busy transitions work because setPresence is designed exactly for session-level changes. You cannot override a manual status on Teams because a user's preferred presence has a higher precedence than your application's session-level presence. If a user manually sets themselves to Away/Busy/DND, your app cannot force them back to Available.

-Recommended API Strategy for Telephony Integration

  • For Active Calls: You should use setPresence to publish temporary call states (such as Busy/InACall or Busy/InAConferenceCall). This endpoint sets an application session state that requires your application client ID as the sessionId.
POST /users/{id}/presence/setPresence
Content-Type: application/json
{
  "sessionId": "{application-client-id}",
  "availability": "Busy",
  "activity": "InACall",
  "expirationDuration": "PT1H"
}

When the call ends: Use setPresence to return your application session to Available / Available. Note that this will not override a user-preferred manual state due to the precedence rules.

  • For Telephony DND: If DND is meant to represent a real user preference that overrides everything else, you should use setUserPreferredPresence:
POST /users/{id}/presence/setUserPreferredPresence
Content-Type: application/json
{
  "availability": "DoNotDisturb",
  "activity": "DoNotDisturb",
  "expirationDuration": "PT8H"
}
  • For Away States: Away / Away is supported by both endpoints. However, because Away has the lowest session-level precedence, if you use setPresence, any other active session (like a desktop client) will win in the aggregated state. If it represents a true user preference, use setUserPreferredPresence.

Please refer the following document:

presence: setUserPreferredPresence

Manage presence state using the Microsoft Graph API

presence: setPresence

Please let me know if you need any further details!


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

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

Was this answer helpful?

2 people found this answer helpful.

0 additional answers

Sort by: Most helpful

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.