question

DennisStrenkowski-4176 avatar image
0 Votes"
DennisStrenkowski-4176 asked NikithaMSFT-0176 commented

Issue with a get filesfolder for a teams channel

I've written a program using the MS Graph REST API that sends a message to a channel with a file attached to the message using delegated permissions.

It works fine using my Office 365 account and have used it with a couple of customers without issue.

Using it at a new customer, I am getting the following error.
But, I am able to upload a file to the Channel Folder manually in the Teams App without issue.

Attempting to retrieve the Channel Folder for 19:ca8d4ccaaesdgsdfhsdaa40cc9e3b3677c75dc85f@thread.skype
Response Message: Not Found
Caught: java.lang.Exception: Failure getting the Channel Folder: {"error":{"code":"NotFound","message":"
https://mycustomer.sharepoint.com/db905278f90cd6f8c0b9e56bb0da6deb2c6a41cf312ab56b9d319b8c55252545ce3e407/978d84225552125552a37b5248a1926dd7fcf3cb7300a2fd01989ebdf009671400c250
Site isn't available. Attempting to create site : False.","innerError":{"date":"2021-05-28T21:48:31","request-id":"2752264b4d-2031-4d03-962e7-aeb1ccb4617a5","client-request-id":"2752264b4d-2031-4d03-962e7-aeb1ccb4617a5"}}}
java.lang.Exception: Failure getting the Channel Folder: {"error":{"code":"NotFound","message":https://mycustomer.sharepoint.com/db905278f90cd6f8c0b9e56bb0da6deb2c6a41cf312ab56b9d319b8c55252545ce3e407/978d84225552125552a37b5248a1926dd7fcf3cb7300a2fd01989ebdf009671400c250 Site isn't available. Attempting to create site : False.,"innerError":{"date":"2021-05-28T21:48:31","request-id":"27564b4d-2031-4d03-96e7-aeb1cb4617a5","client-request-id":"27564b4d-2031-4d03-96e7-aeb1cb4617a5"}}}

Code Snippet:
Request folderRequest = new Request.Builder()
.url("https://graph.microsoft.com/v1.0/teams/${teamId}/channels/${channelId}/filesFolder")
.method("GET", null)
.addHeader("Authorization", "Bearer ${token}")
.build();
Response response = client.newCall(folderRequest).execute();
println "Response Message: " + response.message();

office-teams-app-devmicrosoft-graph-teamwork
· 7
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

We are not able to repro the issue at our end. Could you please check the permissions required to get files folder using jwt.io tool?

0 Votes 0 ·

@DennisStrenkowski-4176 Are you till facing issue if yes could you plese update here?

0 Votes 0 ·

Sorry I missed your first message. Will look into the jwt.io tool. Do you have an example of using the jwt.io tool?

0 Votes 0 ·
Show more comments

0 Answers