Downloading an image contained in a SharePoint List with MSGraph

TourmenteT 30 Reputation points
2024-02-06T16:03:17.32+00:00

Hi, I would like to download an image contained in a SharePoint list (SiteAssets library) using Microsoft Graph API. The issue is that I can't find the ItemID needed to download the file using this documentation. How can I access the content of SiteAssets using MSGraph ? I've read on another post that this is not possible but it goes back one year ago and the Feedback page mentionned is down. Thanks for your help.

Microsoft 365 and Office | SharePoint | For business | Windows
Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 40,476 Reputation points Microsoft External Staff
    2024-02-07T03:13:57.39+00:00

    Hi @TourmenteT, Per my research, there is no update about download file from SiteAssets library by graph. Currently we are still unable to access the files in SiteAssets library using graph. It is highly recommended that you can vote this ticket. 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. Since the issue is a by-design one. As a workaround, I would recommend you to use rest api to access SiteAssets library. Please refer to following api

    https://xxx.sharepoint.com/sites/xiexin/_api/Web/GetFileByServerRelativeUrl('/sites/xiexin/SiteAssets/test.jpg')/$value
    

    ---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.

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.