Graph API get private channel connected site url failing

%3CLINGO-SUB%20id%3D%22lingo-sub-1194338%22%20slang%3D%22en-US%22%3EGraph%20API%20get%20private%20channel%20connected%20site%20url%20failing%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1194338%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20following%20this%20article%26nbsp%3BManage%20lifecycle%20of%20private%20channels%26nbsp%3Bto%20get%20private%20channel's%20site%20url%20using%20App-Only%20authentication.%20As%20per%20the%20article%2C%20its%20giving%20the%20desired%20result%20for%20this%20first%20request%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%22GET%20https%3A%2F%2Fgraph.microsoft.com%2Fbeta%2Fteams%2F%3CGROUP_ID%3E%2Fchannels%3F%24filter%3DmembershipType%20eq%20'private'%22%3C%2FGROUP_ID%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3Bbut%20for%20second%20request%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3EGET%20https%3A%2F%2Fgraph.microsoft.com%2Fbeta%2Fteams%2F%3CGROUP_ID%3E%2Fchannels%2F%3CCHANNEL_ID%3E%2FfilesFolder%3C%2FCHANNEL_ID%3E%3C%2FGROUP_ID%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3Bits%20throwing%20error%26nbsp%3B%20%22502%20Bad%20Gateway%22.%26nbsp%3BCan%20anyone%20suggest%20what%20could%20be%20the%20issue%3F%26nbsp%3B%3C%2FP%3E%3CP%3EError%3A%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%7B%20%22error%22%3A%20%7B%20%22code%22%3A%20%22BadGateway%22%2C%20%22message%22%3A%20%22Failed%20to%20execute%20backend%20request.%22%2C%20%22innerError%22%3A%20%7B%20%22request-id%22%3A%20%226ab8032b-8d33-4543-b2f1-0e13978e9699%22%2C%20%22date%22%3A%20%222020-02-05T07%3A00%3A11%22%20%7D%20%7D%20%7D%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F33639%22%20target%3D%22_blank%22%3E%40Jeremy%20Thake%3C%2FA%3E%26nbsp%3Bany%20tip%20why%20its%20failing%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1194338%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EGraph%20API%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1195254%22%20slang%3D%22en-US%22%3ERe%3A%20Graph%20API%20get%20private%20channel%20connected%20site%20url%20failing%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1195254%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F6833%22%20target%3D%22_blank%22%3E%40Prashant%20Gupta%3C%2FA%3E%26nbsp%3B%2C%20This%20is%20a%20known%20issue%20at%20our%20end.%20We%20are%20working%20on%20it.%20We%20will%20let%20you%20know%20once%20the%20fix%20will%20be%20rolled%20out.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1195459%22%20slang%3D%22en-US%22%3ERe%3A%20Graph%20API%20get%20private%20channel%20connected%20site%20url%20failing%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1195459%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F371090%22%20target%3D%22_blank%22%3E%40Trinetra-MSFT%3C%2FA%3E%26nbsp%3BGood%20to%20know.%20Thanks.%3C%2FP%3E%3CP%3EIs%20there%20any%20place%20where%20do%20you%20follow%20these%20issues%20and%20report%20the%20fix%20for%20e.g.%20in%20github%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1197744%22%20slang%3D%22en-US%22%3ERe%3A%20Graph%20API%20get%20private%20channel%20connected%20site%20url%20failing%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1197744%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F6833%22%20target%3D%22_blank%22%3E%40Prashant%20Gupta%3C%2FA%3E%26nbsp%3B%2C%20We%20are%20tracking%20this%20bug%20internally.%20We%20will%20let%20you%20once%20it%20is%20fixed.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1217380%22%20slang%3D%22en-US%22%3ERe%3A%20Graph%20API%20get%20private%20channel%20connected%20site%20url%20failing%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1217380%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F371090%22%20target%3D%22_blank%22%3E%40Trinetra-MSFT%3C%2FA%3E%26nbsp%3Bany%20updates%20on%20this%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1251483%22%20slang%3D%22en-US%22%3ERe%3A%20Graph%20API%20get%20private%20channel%20connected%20site%20url%20failing%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1251483%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F371090%22%20target%3D%22_blank%22%3E%40Trinetra-MSFT%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20get%20the%20same%20trying%20to%20create%20a%20channel%20with%20members%20as%20per%20documentation%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%7B%0A%20%20%22%40odata.type%22%3A%20%22%23Microsoft.Teams.Core.channel%22%2C%0A%20%20%22membershipType%22%3A%20%22private%22%2C%0A%20%20%22displayName%22%3A%20%22My%20First%20Private%20Channel%22%2C%0A%20%20%22description%22%3A%20%22This%20is%20my%20first%20private%20channels%22%2C%0A%20%20%22members%22%3A%0A%20%20%20%20%20%5B%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%22%40odata.type%22%3A%22%23microsoft.graph.aadUserConversationMember%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%22user%40odata.bind%22%3A%22https%3A%2F%2Fgraph.microsoft.com%2Fbeta%2Fusers('%7B9b5c5cc9-cafb-4fe4-a58d-5bdc96ea7712%7D')%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%22roles%22%3A%5B%22owner%22%5D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%5D%0A%7D%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1321596%22%20slang%3D%22en-US%22%3ERe%3A%20Graph%20API%20get%20private%20channel%20connected%20site%20url%20failing%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1321596%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F371090%22%20target%3D%22_blank%22%3E%40Trinetra-MSFT%3C%2FA%3E%26nbsp%3B%20I%20get%20this%20error%20since%20Thursday%2C%20April%2016th%202020%20when%20trying%20to%20create%20a%20private%20channel%20in%20a%20team%20with%20the%20beta%20API.%20My%20code%20was%20working%20fine%20until%20then.%20Now%20I%20get%20a%20502%20Bad%20Gateway%20with%20%C2%ABError%20processing%20backend%20request.%C2%BB%20error%20message%20%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3EServer%20error%3A%20%60POST%20https%3A%2F%2Fgraph.microsoft.com%2Fbeta%2Fteams%2F%7Bmy-team-id-is-here%7D%2Fchannels%60%20resulted%20in%20a%20%60502%20Bad%20Gateway%60%20response%3A%0A%7B%0A%20%20%22error%22%3A%20%7B%0A%20%20%20%20%22code%22%3A%20%22BadGateway%22%2C%0A%20%20%20%20%22message%22%3A%20%22Failed%20to%20execute%20backend%20request.%22%2C%0A%20%20%20%20%22innerError%22%3A%20%7B%0A%20%20%20%20%20%20%22request-id%22%3A%20%222ceece83-e3ff-455d-bc7b-b82f5454269f%22%2C%0A%20%20%20%20%20%20%22date%22%3A%20%222020-04-17T12%3A45%3A12%22%0A%20%20%20%20%7D%0A%20%20%7D%26nbsp%3B%3C%2FPRE%3E%3CP%3EThe%20JSON%20data%20posted%20%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3EdisplayName%20%3D%20%22Private%20Channel%20Test%22%0AmembershipType%20%3D%20%22private%22%0Adescription%20%3D%20%22Test%22%3C%2FPRE%3E%3CP%3EAny%20update%20about%20this%20problem%20would%20be%20appreciated.%20I%20also%20opened%20a%20StackOverflow%20issue%20%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fstackoverflow.com%2Fquestions%2F61272195%2Fmicrosoft-graph-502-bad-gateway-failed-to-execute-backend-request-when-creatin%3Fnoredirect%3D1%23comment108444350_61272195%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttps%3A%2F%2Fstackoverflow.com%2Fquestions%2F61272195%2Fmicrosoft-graph-502-bad-gateway-failed-to-execute-backend-request-when-creatin%3Fnoredirect%3D1%23comment108444350_61272195%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1445900%22%20slang%3D%22en-US%22%3ERe%3A%20Graph%20API%20get%20private%20channel%20connected%20site%20url%20failing%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1445900%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F629267%22%20target%3D%22_blank%22%3E%40tiois%3C%2FA%3E%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F371090%22%20target%3D%22_blank%22%3E%40Trinetra-MSFT%3C%2FA%3E%26nbsp%3BHi%2C%20as%20of%20today%2C%20I%20can%20read%20channels%20ok%20with%20a%20get%2C%20including%20private%20channels%2C%20but%20I%20cannot%20add%20members%20to%20a%20private%20channel%20using%20either%20POST%20to%20graph%20api%20or%20powershell.%26nbsp%3B%20Output%20is%20a%20502%20BadGateway.%3C%2FP%3E%3CP%3EPrivate%20channels%20are%20in%20high%20demand%20in%20university%20classes%20to%20be%20able%20to%20organise%20team%20assignments.%26nbsp%3B%20This%20worked%20at%20the%20start%20of%20the%20year%2C%20but%20is%20not%20working%20now.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1449444%22%20slang%3D%22en-US%22%3ERe%3A%20Graph%20API%20get%20private%20channel%20connected%20site%20url%20failing%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1449444%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F64418%22%20target%3D%22_blank%22%3E%40Ben%20Hatton%3C%2FA%3E%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F371090%22%20target%3D%22_blank%22%3E%40Trinetra-MSFT%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%2C%20I'm%20also%20getting%20error%3A%20%22Failed%20to%20execute%20Aad%20backend%20request%20GetUsersByObjectIdsS2SRequest.%20Workload%20Unknown%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20trying%20to%20create%20a%20private%20channel%20with%20the%20json%20structure%20indicated%20on%20the%20documentation.%20I%20have%20granted%20app%20al%20required%20permissions.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Contributor

I am following this article Manage lifecycle of private channels to get private channel's site url using App-Only authentication. As per the article, its giving the desired result for this first request

"GET https://graph.microsoft.com/beta/teams/<group_id>/channels?$filter=membershipType eq 'private'"

 but for second request

GET https://graph.microsoft.com/beta/teams/<group_id>/channels/<channel_id>/filesFolder

 its throwing error  "502 Bad Gateway". Can anyone suggest what could be the issue? 

Error: 

{ "error": { "code": "BadGateway", "message": "Failed to execute backend request.", "innerError": { "request-id": "6ab8032b-8d33-4543-b2f1-0e13978e9699", "date": "2020-02-05T07:00:11" } } }

@Jeremy Thake any tip why its failing?

8 Replies

@Prashant Gupta , This is a known issue at our end. We are working on it. We will let you know once the fix will be rolled out. 

@Trinetra-MSFT Good to know. Thanks.

Is there any place where do you follow these issues and report the fix for e.g. in github?

@Prashant Gupta , We are tracking this bug internally. We will let you once it is fixed.

@Trinetra-MSFT 

I get the same trying to create a channel with members as per documentation 

{
  "@odata.type": "#Microsoft.Teams.Core.channel",
  "membershipType": "private",
  "displayName": "My First Private Channel",
  "description": "This is my first private channels",
  "members":
     [
        {
           "@odata.type":"#microsoft.graph.aadUserConversationMember",
           "user@odata.bind":"https://graph.microsoft.com/beta/users('{9b5c5cc9-cafb-4fe4-a58d-5bdc96ea7712}')",
           "roles":["owner"]
        }
     ]
}

@Trinetra-MSFT  I get this error since Thursday, April 16th 2020 when trying to create a private channel in a team with the beta API. My code was working fine until then. Now I get a 502 Bad Gateway with «Error processing backend request.» error message :

 

Server error: `POST https://graph.microsoft.com/beta/teams/{my-team-id-is-here}/channels` resulted in a `502 Bad Gateway` response:
{
  "error": {
    "code": "BadGateway",
    "message": "Failed to execute backend request.",
    "innerError": {
      "request-id": "2ceece83-e3ff-455d-bc7b-b82f5454269f",
      "date": "2020-04-17T12:45:12"
    }
  } 

The JSON data posted :

 

displayName = "Private Channel Test"
membershipType = "private"
description = "Test"

Any update about this problem would be appreciated. I also opened a StackOverflow issue : https://stackoverflow.com/questions/61272195/microsoft-graph-502-bad-gateway-failed-to-execute-backe...

@tiois @Trinetra-MSFT Hi, as of today, I can read channels ok with a get, including private channels, but I cannot add members to a private channel using either POST to graph api or powershell.  Output is a 502 BadGateway.

Private channels are in high demand in university classes to be able to organise team assignments.  This worked at the start of the year, but is not working now.

@Ben Hatton @Trinetra-MSFT 

 

Hi, I'm also getting error: "Failed to execute Aad backend request GetUsersByObjectIdsS2SRequest. Workload Unknown"

 

I'm trying to create a private channel with the json structure indicated on the documentation. I have granted app al required permissions.