How to troubleshoot download and link copying errors in Teams Bot App

Ian 0 Reputation points
2025-07-21T02:31:40.5333333+00:00

A Teams Bot App is under development using the RESTful API with the following implementation steps:

  1. The Graph API is utilized to upload a file to the user's OneDrive.
  2. The Teams Bot RESTful API sends a proactive message to the user with the following body:
      {
       "type": "message",
       "attachments": [
           {
               "contentType": "application/vnd.microsoft.teams.card.file.info",
               "contentUrl": "https://mstenant2-my.sharepoint.com/personal/ian_yu_mstenant2_onmicrosoft_com/Documents/Microsoft%20Teams%20Chat%20Files/clock.pdf",
               "name": "clock.pdf",
               "content": {
                   "uniqueId": "01QV6OUNEZZEER3GC5JZB2YUZTQKGEUB3M",
                   "fileType": "pdf"
               }
           }
       ]
   }
  1. When the user clicks download, an error occurs: "Download failed due to unexpected error. Please try again"
    User's image

Additionally, a "Couldn't copy link" error appears when attempting to copy the link:
User's image

The file icon leads to a blank screen:
User's image

Despite these issues, the file opens successfully in the browser. What might be causing these problems?

Microsoft Teams | Microsoft Teams for business | Files | Find and share files
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Vivian-HT 3,055 Reputation points Microsoft External Staff Moderator
    2025-07-21T03:18:22.2333333+00:00

    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

    Option 2. Improper Use of contentUrl

    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.

    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.User's image


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.