Retrieve Channel Folder with Graph API returns 502 Bad Gateway

Copper Contributor



I've been using this API for a little while:{id}/channels/{id}/filesFolder

 Recently I noticed that in some site this API will result in a Bad Gateway error.

I tried this in both Graph Explorer and my test program, at first I thought it was a lack of permission so I modified the permissions on Graph Explorer according to :


Files.Read.All, Files.ReadWrite.All
Group.Read.All, Group.ReadWrite.All
Sites.Read.All, Sites.ReadWrite.All

(My app is using application permission)


So with all of these enabled, I tested it again on the Graph Explorer, and it ended up the same:ss1.png


Meanwhile I found this doesn't happen on every site, in some site this API will work fine even without permission changes (previously it was just Files.ReadWrite.All + Sites.ReadWrite.All I think)

So I'm not sure what is causing this error, is there still some permission I need to enable, or is there something special with the site I'm testing?



4 Replies
best response confirmed by Trinetra-MSFT (Microsoft)

@Trinetra-MSFT Thanks for your help.

This API worked and it looks like a suitable substitute for what I've been trying, thanks.

Just one more thing, if the channel has somehow been renamed, would there be any ways to track it back to the original folder?

@Trinetra-MSFT I am also having the same issue. I am trying to get the site url of a private channel and since private channel has separate site collection so this url{team-id}/drive/root/children does not provide the desired result.

To get private channel site url, I am using but this throws 502 bad gateway in one tenant but in other tenant it works. I tried all possible ways to fix it i.e. by changing permissions to the app but it didn't work and I am stuck. Could you suggest why I am facing this issue in one tenant and is there any other way to get private channel site collection url?

Please note that, before sending a request to this given url I am sending another request to get all private channels and that works in both the tenants but this one fails.



@Prashant Gupta I'm having the exact same issue.

1 best response

Accepted Solutions
best response confirmed by Trinetra-MSFT (Microsoft)