Sorry, this file has been deleted or moved - Teams graph api

Pradip Kumbhar 111 Reputation points
2021-03-29T06:19:17.347+00:00

Hi All,

I am sending the file to the team's channel by using the team's graph API, by referring to the below document but when clicked on a file in the team's channel getting an error message as "sorry, this file has been deleted or moved."

https://learn.microsoft.com/en-us/graph/api/chatmessage-post?view=graph-rest-beta&tabs=http

Below is my code:

Endpoint:
82272-image.png

Body:
82292-image.png

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,293 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
2,777 questions
{count} votes

Accepted answer
  1. Pradip Kumbhar 111 Reputation points
    2021-04-01T04:56:47.307+00:00

    Hi All,

    Finally, I am able to figure out the issue, there was an issue with View ID and Content URL.

    The vieweId should be documented source ID, it will be visible in browser with the label "sourcedoc".

    In the case of the root site, we need to provide /:x:/r/ in addition to the file path

    Correct URL Path:
    https://nowlabcorp.sharepoint.com/:x:/r/Shared%20Documents/report.csv


0 additional answers

Sort by: Most helpful