Forum Discussion
MS Graph setPresence problems
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 -
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
- When 2 people were in actual Teams call, a new incoming call is not rejected.
- 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,
--------------------------------------------------------------------------------------------------------------------------------------------
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.
- relkniwSep 23, 2021Brass Contributor
- Meghana-MSFTSep 23, 2021Bronze Contributor
relkniw -
- Could you please share the ids as shown in below screenshot.
2. We were able to repro the issue, We are checking it internally. we will let you know.
- relkniwSep 28, 2021Brass Contributor
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:
- But my status in the contact list of another MS Teams client will change immediately:
- relkniwSep 23, 2021Brass Contributor
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.
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".