Forum Discussion

hidayat3676's avatar
hidayat3676
Copper Contributor
May 18, 2021

Can't Get Files of channels from team using graph api

Hi,

I've an Oauth App created in AAD thorough which i can access teams, channels and channels messages including attachments but not getting  attachment content   using the same token.

following as an example attachment url which i get from  teams/{teamid}/channels/{channelid}/messages

but

when i try https://{mysubdomain}.sharepoint.com/sites/Public/Shared%20Documents/General/file.txt

 

it return 401 Unauthorized

 

following permissions are already given to the app.

Files.Read.All

Files.Read

ChannelMessage.Read.All

Please Guide on how to get the attachment using graph api.

Resources