Forum Discussion

relkniw's avatar
relkniw
Brass Contributor
Sep 14, 2021

MS Graph setPresence problems

Hi everyone, we have two issues with MS Graph setPresence:
1. Every time I do api call with a valid availability/activity, I get 200 OK but I don’t see the status actually changing in the Teams App. What’s funny, I can see it being changed if I am logged as another user and just observe the user I change the status for. The status updates only when I restart teams app.

2. Although I set the Presence State to “Busy – InACall”, incoming calls are not rejected. And yes, Busy on Busy (Busy Options) is activated. So if I have a real Teams call a new incoming call is rejected.
Any ideas how to resolve these two issues?
Thanks.

  • relkniw - We tried to repro the issue. For 1st issue We see the status is getting updated right away without restarting the app. Could you please share the request and response headers for the request where you see the status is not getting updated? Please make sure you have removed any PII. We are looking into 2nd issue.

    • relkniw's avatar
      relkniw
      Brass Contributor

      Meghana-MSFT- We are using the nuget Microsoft.Graph SDK with c# in VisualStudio. What is the best way to see the request and response headers?

      • Meghana-MSFT's avatar
        Meghana-MSFT
        Icon for Microsoft rankMicrosoft

        relkniw -

        1. Please put a debugger at catch block and look for the message. You will find the request-ids in it.  

        try{
        await graphClient.Users["{user-id}"].Presence
        	.SetPresence(sessionId,availability,activity,expirationDuration)
        	.Request()
        	.PostAsync();
        }
        catch(Exception e)
        {
          Console.WriteLine(e.Message);
        }

         2. For the 2nd issue, we tried in below ways

        1. When 2 people were in actual Teams call, a new incoming call is not rejected.
        2. When the Presence State is set to "Busy – InACall", a new incoming call is not rejected.

        Could you please try  and confirm what is happening in your case? By real Teams call do you mean an actual call between 2 people?

         

        Thanks,

        Meghana

        --------------------------------------------------------------------------------------------------------------------------------------------

        If the response is helpful, please click "**Mark as Best Response**" and like it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.

Resources