MS Graph setPresence problems

Brass Contributor

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.

18 Replies

@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.

@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?

@relkniw How do you find out the sessionId?

As described here https://docs.microsoft.com/en-us/graph/api/presence-setpresence:
Important
Provide the ID of the application as sessionId in the request.

@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.

@Meghana-MSFT 

2. Yes I mean a Call between two people. Have you configured the "Busy on busy when in a call" as "Enabled". You find that setting in the Teams Admin -> Voice -> Calling policies -> Global.

relkniw_0-1632379355110.png

If this is configured, a new incomming call will be rejected if 2 people were in actual Teams call. But not if the Presence State is set to "Busy – InACall".

@Meghana-MSFT 

1. Do you mean that? Or do you need a special value?

relkniw_2-1632385024363.png

 

@relkniw -

  1. Could you please share the ids as shown in below screenshot. 

MeghanaMSFT_1-1632410282202.png

 

2. We were able to repro the issue, We are checking it internally. we will let you know.

@Meghana-MSFT 

1. We do not get an exception.
The Problem is:

- Call SetPresence with Busy - InACall for Gerd Winkler via MS Garph API

- My Status in the header of my MS Teams Client will not change:

relkniw_0-1632826796171.png

- But my status in the contact list of another MS Teams client will change immediately:

 

relkniw_1-1632826844512.png

 

@relkniw 

  1. I tested this issue using postman and it was working fine. Later I tried it using C# and was able to repro the issue. We have raised a bug for the same and the concerned team is looking into it.
  2. We were able to repro this issue as well. We have raised a bug for the same and the concerned team is looking into it.

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.

@Meghana-MSFT 

Hi Meghana,

 

any news regarding my issues?

 

Regards

 

Gerd

@relkniw - We are checking with the engineering team on bug's status. We will update you.
@relkniw - Currently we do not have ETA to share. I will update you once the bug is fixed.

@Meghana-MSFT 

Hi Meghana,

 

any news regarding my 2. issue "When the Presence State is set to "Busy – InACall", a new incoming call is not rejected"?

 

Regards

Gerd

@relkniw - @relkniw - We got an update from the engineering team regarding the second issue. This status is not for the purpose to block call, its just for display purpose. You can suggest this feature on Microsoft Uservoice.  

This issue has been resolved, could you please check and confirm once.
Hi, same issue as before:
- Busy on busy during calls is enabled for my user
- over graph api my user is set to busy inacall
- incoming call from another user is visible and ringing on my side and not declined with busy

When busy inacall set by doing a teams call, i dont see a new incoming call and the caller gets a busy, trying to call me.