selvakumar
selvakumar

Reputation: 1791

Microsoft Graph API: Getting channels of a Team(Group) is not working

Hi i am trying to get the channels of a Microsoft team using Graph api (Updated recently) as follows

var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://graph.microsoft.com/beta/groups/f389913f-b38d-4784-a37c-9ae3259275dc/channels",
  "method": "GET",
  "headers": {
    "authorization": "token`enter code here`",
    "cache-control": "no-cache",
    "postman-token": "f4e5037c-913a-bc76-10a2-a0adb9064c11"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});

But i am getting the following error.

{
  "error": {
    "code": "AccessDenied",
    "message": "Failed to execute Skype backend request GetThreadRequest. Request Url: https://apac-client-ss.msg.skype.com/v1/threads/19:[email protected]?view=msnp24Equivalent, Request Method: GET,. The server failed to respond correctly. Response Code: Forbidden, Reason: SkypeToken is from a disallowed region.. Response Headers: Pragma: no-cache\r\nContextId: tcid=7407026678545725096,server=EAP010230200016\r\nCache-Control: no-store, must-revalidate, no-cache\r\nDate: Fri, 12 May 2017 12:29:34 GMT\r\nServer: Microsoft-HTTPAPI/2.0\r\n",
    "innerError": {
      "request-id": "46e772e4-9611-4f78-82ec-a43289ce5d17",
      "date": "2017-05-12T12:29:34"
    }
  }
}

Is there any problem in this. Reference: https://developer.microsoft.com/en-us/graph/docs/api-reference/beta/api/group_list_channels I also gave the permission (Group.ReadWrite.All).

Upvotes: 1

Views: 2205

Answers (3)

EricRRichards
EricRRichards

Reputation: 474

I've been seeing this occurring irregularly off and on over the past few weeks. There doesn't seem to be any rhyme or reason as to why it pops up. Sometimes the request works, sometimes it falls over with this "Failed to execute Skype backend request GetThreadS2SRequest." error.

If it fails, I can retry the request once or twice and get the results eventually.

My suspicion is that there is some kind of a bug or instability in the Teams backend that is causing this issue.

Upvotes: 0

Hemant Kumar
Hemant Kumar

Reputation: 1

You need delegate permission for getting a channel of a group. Currently application permission does not support for getting channels api calls.

Upvotes: 0

This was due to a phased deployment of this new API, which hadn't yet rolled out to your region. It should be available now if you re-try. Apologies for the inconvenience.

Note that you can use the Microsoft Graph Explorer to play with these APIs, and to help determine if there is a problem with your code or if there is an issue with the API itself. You can use it with a sample account or - even better - sign in with the specific account you are using/testing.

Upvotes: 5

Related Questions