Drive item preview from multiple sites

captain_atharv 511 Reputation points
2022-06-17T07:57:41.597+00:00

Hi,

I'm using https://learn.microsoft.com/en-us/graph/api/driveitem-preview?view=graph-rest-1.0 to get signed URL (getUrl) for previewing drive items. Currently, this API works for single site only - /sites/{siteId}/drive/items/{itemId}/preview.
Is there a way to use this or any other API to generate signed URL for items in multiple sites?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,059 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
11,223 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
3,298 questions
0 comments No comments
{count} votes

Accepted answer
  1. Tong Zhang_MSFT 9,246 Reputation points
    2022-06-21T08:56:08.89+00:00

    Hi @captain_atharv ,

    According to my research and testing, currently ,there is no way to preview driveItem in multiple sites, it only works for items in a single site.

    I recommend you can mention a feedback on this issue . Many features of our current products are designed and upgraded based on customers’ feedback. With requirements like this increase, the problem may well be released in the future. Thanks for your understanding.

    Graph feedback forum
    https://feedbackportal.microsoft.com/feedback/forum/ebe2edae-97d1-ec11-a7b5-0022481f3c80


    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.


    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Shivam Dhiman 6,071 Reputation points
    2022-06-17T15:42:47.167+00:00

    Hi @captain_atharv

    Preview Graph API is only available for items in single sites only. You can also use Sharing link for items but it is also available with single sites only.

    Hope this helps.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have further questions about this answer, please click "Comment".

    1 person found this answer helpful.
    0 comments No comments

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.