Frébo
Frébo

Reputation: 678

Microsoft Graph: Requests to voice calls endpoint return 500 UnknownError without message

I created an app for Microsoft Teams which provides a bot and makes requests to the Graph API to get some user details. All is working fine so far. The app is trusted and I can work with the Graph API.

I set up the bot to support voice calls and when I call the bot, I do get a POST request with all information. However when I want to work with this call, e.g. reject it immediateley, the request to Microsoft Graph API fails with status code 500: UnknownError.

This is my testcode:

async RejectIncomingCall(id) {
  const client = await getAuthenticatedClient(this.token);

  try {
    return await client.api(`/app/calls/${id}/reject`).version('beta').post('');
  } catch (e) {
    console.log('Error rejecting call!', e);
  }
}

I have no information what's wrong. I can reproduce this behavior using the Graph Explorer when I try to get a call: enter image description here

So in fact all requests to the call API seem to be failing.
Any idea, what I did wrong?
Did I missunderstood something or is the beta api at this point just not working?

Upvotes: 0

Views: 112

Answers (1)

taurus05
taurus05

Reputation: 2546

You're getting an unknown error because of the kind of request you're trying to make.
If you wish to reject a call, you'll have to make a POST request not a GET request.
Refer to this Link for more clear reference.
In graph explorer change the request type from GET to POST. Check if it works. If not, let me know.

Upvotes: 1

Related Questions