1

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:88b4b1fa52214b7fbb3fd8d10bd37cea@thread.skype?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).

selvakumar
  • 1,771
  • 3
  • 20
  • 34

3 Answers3

5

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.

  • for me it's still not working, I'm based in switzerland – Luca Jul 19 '17 at 09:02
  • Same here. I've got the same issue but I was trying access /team - ( https://graph.microsoft.com/beta/groups/{id}/team ). Is it possible that we can we request to roll out the new API on a particular region? – paolooo Nov 24 '17 at 12:58
  • Sir.. Please answer my question, https://stackoverflow.com/questions/57170656/skype-for-business-receive-im-not-working-with-the-below-steps .. I am not able to receive im, in skype for business UCWA api. As you have already worked on this, I am not able to receive any IM in UCWA. Please guide me sir. – curious_one Jul 27 '19 at 11:44
  • I am also facing same issue today middle of the day. It was working fine in morning, Please let me know if there any phase deployment going on. Waiting for your response. Thanks !! – Raj Rajput Apr 17 '20 at 17:13
0

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

NightOwl888
  • 55,572
  • 24
  • 139
  • 212
  • This is an important enhancement that's needed to build a use-able flow with microsoft graph api's. Is there enhancement request that we can track or vote for? – Andy Dufresne Jun 18 '18 at 08:36
0

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.

EricRRichards
  • 474
  • 7
  • 20