Forum Discussion
How to Download Video Clip from Microsoft Teams Programmatically
Videos recorded using the Teams widget are typically stored in Microsoft Stream or OneDrive for Business, depending on your organization's settings. If you are getting a 401 error, it might be due to incorrect or insufficient permissions. Double-check the scopes and permissions granted to the token. You might need permissions like Files.Read.All or Sites.Read.All to access the video files.
- AfrazKhanNov 25, 2024Copper Contributor
Thanks for the help. I tried to attach the mentioned permissions with the token generated but still same issue.
I have done some furhture investigation, let me share that with you. Maybe you might help
Below is the format of the file link I receive in the bot app message.
https://as-api.asm.skype.com/v1/objects/0-at-g24-9238bn928bfnr47g3489hb72/views/video
Since I am able to download the file from the Teams client so I tried to investigate the HTTP GET request with Fiddler. I copied the token from the the request I saw in Fiddler and attempted to fetch the file from the code using that token for auth and file was downloaded successfully.
There is only one permission attached to that token ==> Teams.AccessAsUser.All
I tried to find this permission in the Entra ID app but couldn't find it.
Any idea about this?
- Prasad_Das-MSFTNov 26, 2024
Microsoft
We also checked and observed that, Teams.AccessAsUser.All permission is not available in Entra ID app.
- AfrazKhanNov 26, 2024Copper Contributor
My issue still remains unresolved :( Is there another related channel where I can ask this question? or some paid support to connect with teams dev team.