Jan 15 2020 06:33 PM
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,
Jan 16 2020 10:32 PM
Solution@ck1521, Could you please give try to following api call:
https://graph.microsoft.com/v1.0/sites/{site-id}/drive/root/children/
Jan 16 2020 11:50 PM
@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?
Feb 04 2020 11:50 AM
@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 https://graph.microsoft.com/beta/groups/{team-id}/drive/root/children does not provide the desired result.
To get private channel site url, I am using https://graph.microsoft.com/beta/teams/group-id/channels/private-channel-Id/filesFolder 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.
Jun 12 2020 09:46 AM
@Prashant Gupta I'm having the exact same issue.
Jan 16 2020 10:32 PM
Solution@ck1521, Could you please give try to following api call:
https://graph.microsoft.com/v1.0/sites/{site-id}/drive/root/children/