Dear @Ian,
Thank you for posting your question in the Microsoft Q&A forum.
Thank you for sharing the details of the issue you're encountering with your Teams Bot App. I understand how frustrating it can be when unexpected errors like these disrupt your workflow. Here are some options I recommend you look through:
Option 1: Missing or Invalid Access Token
- Many developers report that file downloads fail due to missing or expired access tokens. Even if the file is accessible via browser (which uses the user's session), Teams Bot requires a valid token to access the file programmatically.
- For more information: https://stackoverflow.com/questions/53110090/downloading-an-attachment-from-teams-across-a-bot-nodejs
Option 2. Improper Use of contentUrl
- The
contentUrl
in your JSON payload points directly to a OneDrive link. This URL may not be accessible to Teams unless it's wrapped in a sharing link with appropriate permissions. Microsoft Graph API requires adriveItem
-based sharing link for secure access. - For more information: https://learn.microsoft.com/en-us/graph/api/shares-get?view=graph-rest-1.0&tabs=http
Option 3. Teams Client Bugs
There are known issues in Teams clients (desktop and web) where copying links or downloading files fails due to internal bugs. Microsoft has acknowledged these and issued fixes for some tenants, but others may still be affected.
In this case, the combination of download failures, link-copying issues, and blank preview screens suggests a complex interaction between Teams, Graph API, and SharePoint, something that may require deeper diagnostics than I can provide in this forum.
Therefore, to help you move forward, I’d recommend posting your question on the Microsoft Tech Community under the Teams Development or Graph API sections. The community there includes many experienced developers and Microsoft engineers who may have encountered similar challenges and can offer targeted advice.
Note: We apologize for redirecting you to related development support team because the moderators in this community are limited with the resource for further investigation and to get a quick resolution to your problem
Additionally, if you have access to a Microsoft support plan, opening a support ticket through the Microsoft 365 Admin Center would allow Microsoft’s backend team to investigate tenant-specific logs and permissions, which are often key to resolving such issues.
- If you are user, please ask your admin to raise support ticket to Microsoft Support Team
- Create a support request from the Microsoft 365>Support>New Service Request. An admin can submit a support request from https://admin.microsoft.com/#/support/requests.
- Reference: Get support - Microsoft 365 admin | Microsoft Learn
Thank you for your understanding, and we hope this gets resolved quickly for you!
I hope this information is helpful. If you have any further questions, feel free to reach out.
I'm looking forward for your reply.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.