Unable to Retrieve SharePoint List Item Attachments in .NET Core using Graph API

EdbergVasan DallasVaz 0 Reputation points
2025-02-13T07:00:27.3+00:00

In SharePoint Online, when retrieving list items using Graph Explorer, the Attachments property only returns a boolean value (true or false), indicating whether an item has attachments. However, it does not provide direct links to attached files such as images, PDFs, or text documents.

However, Graph Explorer does not support the Attachments property.

I need help in retrieving attachment links for list items in SharePoint Online using the Microsoft Graph API using C#.

Microsoft 365 and Office SharePoint Development
Microsoft Security Microsoft Graph
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Yanli Jiang - MSFT 31,596 Reputation points Microsoft External Staff
    2025-02-13T09:43:50.48+00:00

    Hi @EdbergVasan DallasVaz ,

    Good days, thanks for posting in this forum.

    Unfortunately, it is currently impossible to obtain the URL of the attachment in the List item through the API. As you said, it only returns a Boolean value. But you can try to use Power Shell to obtain relevant information about Attachments:

    SharePoint Online: Get Attachments Report in a List using PowerShell

    Non-official, just for reference.

    Please do let us know if you have any further queries.

    Kindly consider accepting the answer if the information provided is helpful. This can assist other community members in resolving similar issues.


  2. 杨建宇 86 Reputation points MVP
    2025-02-26T06:20:29.47+00:00

    you can try to use below API:

    GET /sites/{site-id}/lists/{list-id}/items/{item-id}/driveItem

    https://learn.microsoft.com/en-us/graph/api/driveitem-get?view=graph-rest-1.0&tabs=csharp

    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.