Forum Discussion

ck1521's avatar
ck1521
Copper Contributor
Jan 16, 2020
Solved

Retrieve Channel Folder with Graph API returns 502 Bad Gateway

Hello,

 

I've been using this API for a little while:

https://graph.microsoft.com/beta/teams/{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 :

https://docs.microsoft.com/en-us/graph/api/driveitem-get?view=graph-rest-beta&tabs=http

 

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:

 

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?

 

Thanks,

Resources