question

DerekBotbyl-0439 avatar image
0 Votes"
DerekBotbyl-0439 asked saldana-msft edited

Teams and Out of Office notifications

Hello,
I am programmatically setting automatic replies for users via Graph API. This is working great for Exchange, however I have noticed a behavior in Teams that is unexpected. It appears if the user is offline when the automatic reply is enabled or disabled, the status does not change in Teams. This is leading to some confusion with the user's peers.
Is there any method by which we can update an offline user's Teams status? Preferably with MS Graph API?

office-teams-windows-itprooffice-teams-app-devmicrosoft-graph-teamworkmicrosoft-graph-users
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

michev avatar image
0 Votes"
michev answered

OOO is an Exchange status, not Teams. Teams uses "presence" instead, but those are not directly related. I can be "available" in Teams (green), while being OOO. Also keep in mind that clients, such as Outlook or Teams, periodically poll for the OOO info, so there can be a delay with what other people see. 30 mins I believe is the expected behavior.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

JimmyYang-MSFT avatar image
0 Votes"
JimmyYang-MSFT answered JimmyYang-MSFT edited

Hi @DerekBotbyl-0439
Considering your question is also talking about API requirements, so I will also add office-teams-app-dev tag to your thread. Thanks for your understanding and patience!

For Teams client, you could click your profile picture and reset status like the following picture:
200553-image.png


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.



image.png (12.6 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Sayali-MSFT-0291 avatar image
0 Votes"
Sayali-MSFT-0291 answered JimmyYang-MSFT commented

Please have a look at this doc-https://docs.microsoft.com/en-us/graph/api/user-update-mailboxsettings?view=graph-rest-1.0&tabs=http

  PATCH https://graph.microsoft.com/v1.0/me/mailboxSettings 
     Content-Type: application/json
     {
     "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#Me/mailboxSettings",
     "automaticRepliesSetting": {
         "status": "Scheduled",
         "scheduledStartDateTime": {
           "dateTime": "2022-05-10T20:00:00.0000000",
           "timeZone": "UTC"
         },
         "scheduledEndDateTime": {
           "dateTime": "2022-05-12T20:00:00.0000000",
           "timeZone": "UTC"
         }
     }
     }


· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Yes, this is the PATCH call I am making.

 {
     "automaticRepliesSetting": {
         "externalAudience": "all",
         "externalReplyMessage": "This account is no longer available",
         "internalReplyMessage": "This account is no longer available",
         "status": "alwaysEnabled"
     }
 }

I am making this call against users who are offline and may never connect to the Teams client again. (Leavers)
I have one account I have been following as this user is a returner, in which the process then disables any automatic replies. It did eventually clear a few days later. I think I recall hearing something about Teams refreshing caches once a week, is there confirmation on this?

0 Votes 0 ·

@DerekBotbyl-0439 - At the moment, there is no way to clear the local cache directly from within the Microsoft Teams app until Microsoft pushes out an update.
https://www.onmsft.com/how-to/how-to-clear-your-microsoft-teams-cache-on-windows-10

0 Votes 0 ·

@DerekBotbyl-0439

Just checking in to see if above information was helpful. If you have any further updates on this issue, please feel free to post back.

0 Votes 0 ·