Mar 04 2019 05:41 AM
Hi,
I am trying to list channels with Graph API by sending
`GET https://graph.microsoft.com/beta/groups/{id}/channels` (`GET https://graph.microsoft.com/v1.0/teams/{id}/channels` does not work as well).
The response is:
{
"error": {
"code": "BadRequest",
"message": "Failed to execute Skype backend request GetThreadS2SRequest.",
"innerError": {
"request-id": "74635040-5d24-4399-9954-2c15643db862",
"date": "2019-03-04T13:20:37"
}
}
}
At the same time `GET https://graph.microsoft.com/v1.0/me/joinedTeams` works well. I have tried to create a new team and pass its id, but the result is the same. Is this MS issue or something wrong with my setup/request?
Thanks.
Mar 05 2019 03:12 AM - edited Mar 05 2019 03:14 AM
Thank you for your reply.
I take it from the `https://graph.microsoft.com/v1.0/me/joinedTeams` response and put it to next call: `https://graph.microsoft.com/v1.0/teams/a72df4a4-bbb2-4ce8-9264-fc58df4bcf31/channels`. I am using postman.
Mar 05 2019 08:40 AM
It looks like this is definitely not an id issue: I am able to get messages with `https://graph.microsoft.com/beta/teams/a72df4a4-bbb2-4ce8-9264-fc58df4bcf31/channels/19:f778a09939b4...` (I have copied channel id from the web application). I am wondering are there any limitations for the free version of MS Teams or something like this.
Mar 07 2019 12:44 PM
SolutionCan you Please go to GraphExplorer https://developer.microsoft.com/en-us/graph/graph-explorer add the Teams Category and login with your Office 365 Credentials. Try the Channels of a Team which I am a member of. which eventually is https://graph.microsoft.com/v1.0/teams/{ID}/channels. I tested just now it works fine...
Mar 07 2019 12:45 PM
I am doing this on an E3...The Graph explorer can help you see if the API is working for your id.
Mar 07 2019 01:45 PM
Thank you for your reply. I have signed in with the same credentials (to graph-explorer and teams.microsoft.com). I do have some teams, but GET https://graph.microsoft.com/v1.0/me/joinedTeams returns me
{
"error": {
"code": "ResourceNotFound",
"message": "Resource not found.",
"innerError": {
"request-id": "75aba59f-1b7b-4edb-b923-ca4cca4f4dbe",
"date": "2019-03-07T21:39:10"
}
}
}
Mar 07 2019 01:52 PM
Please ignore my previous reply. I found the reason on SO why I am getting 404. Trying to resolve it.
Mar 22 2019 08:35 AM - edited Mar 22 2019 08:36 AM
Thanks. It turns out to be a problem with my account: it was some old account and when I logged in with it to Graph Explorer I realized that some request does not work as expected.
I have created a new account and sign into Microsoft developer program. Everything works fine now.
Jun 20 2019 11:20 PM
I'm having the same issue. I can't create another account.
I go to the graph-explorer link you give, use the Channels of a Team which I am a member of, and I get the same respone.
{
"error": {
"code": "AccessDenied",
"message": "Failed to execute Skype backend request GetThreadRequest.",
"innerError": {
"request-id": "870a5389-4f23-44d7-86aa-6d198dd59751",
"date": "2019-06-21T06:14:03"
}
}
}
I do have the Group.Read.All and Group.ReadWrite.All both as application and delegated permission.
Oct 21 2019 10:49 AM - edited Oct 21 2019 10:50 AM
HI, @mhodovnaiuk,
Did you found a solution for this issue ? I have same responce to the same request:
GET https://graph.microsoft.com/v1.0/teams/994b7a25-c7ab-41a4-89ac-1ef122af6c70/channels
{
"error": {
"code": "AccessDenied",
"message": "Failed to execute Skype backend request GetThreadS2SRequest.",
"innerError": {
"request-id": "2fa1089b-77cb-4dcc-a8f9-9d32649c6653",
"date": "2019-10-21T17:32:42"
}
}
}
team_id (994b7a25-c7ab-41a4-89ac-1ef122af6c70) is copypasted from Azure portal UI, and I have the Group.Read.All and Group.ReadWrite.All both as application and delegated permission.
Request
GET https://graph.microsoft.com/v1.0/users
works fine.
Oct 21 2019 02:32 PM
@syanenko
Solved by changing from 'authorization_code' to 'client_credentials' while requesting access token.
Jul 30 2020 06:30 AM
Is this issue fixed? I am still facing the issue in getting ms teams channels only for non azure admin users
https://graph.microsoft.com/v1.0/teams/team_id/channels
{
}
Provided the right delegated permissions Group.ReadWrite.all and Directory.Read.all permissions and granted admin consent.
Feb 18 2021 07:15 PM
For anyone who stumbles across this in the future, you cannot list channels for teams that the authenticated user is not added to.
After scouring the documentation I don't think this is explicitly stated anywhere but holds true.