How to get CallRecord-Id for Graph REST API for Teams?

30 views Asked by At

I am trying to create a REST API which will return Microsoft Teams's call details for a give user for troubleshooting. To achieve that, we need various details of a call (like average jitter, packet loss etc.). I am trying to fetch those details from CQD by using Graph API using the documentation provided here. (See the last option "Graph API")

From that document, see Example 2: Get full details (for C#) at Learn.Microsoft.com

As per that we have to pass "CallRecord-id" to get full details, here is the snippet:


var result = await graphClient.Communications.CallRecords["{callRecord-id}"].GetAsync((requestConfiguration) => { requestConfiguration.QueryParameters.Expand = new string []{ "sessions($expand=segments)" }; });

For CallRecord-id, the document says following:

There are two ways to get the id of a callRecord:

 - Subscribe to change notifications to the /communications/callRecords
   endpoint.
   
 - Use the callChainId property of a call. The call record is available 
   only after the associated call is completed.

We can't choose the second option as it doesn't support delegate (only applicaiton like bot can use it) So we can only use first option. Any idea how to use the first option? The documentation seems good at first, but lack of examples are bothering. Please help if you know any other way (PowerBI REST API or PowerShell command) then I am open to try that.

Thank you.

0

There are 0 answers