SOLVED

Issues in getting attachments from SharePoint list/library using Graph api

%3CLINGO-SUB%20id%3D%22lingo-sub-546158%22%20slang%3D%22en-US%22%3EIssues%20in%20getting%20attachments%20from%20SharePoint%20list%2Flibrary%20using%20Graph%20api%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-546158%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20All%2C%3C%2FP%3E%3CP%3EI%20unable%20to%20get%20the%20actual%20attachement%20from%20the%20SharePoint%20list%2Flibrary%20using%20the%20Microsoft%20graph%20api%2C%3C%2FP%3E%3CP%3EI%20am%20only%20getting%20the%20response%20as%20%22%20Attachement%3A%20True%22%20in%20the%20response.Please%20let%20me%20know%20is%20there%20any%20way%20to%20get%20the%20attachments%20from%20SharePoint.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-633285%22%20slang%3D%22en-US%22%3ERe%3A%20Issues%20in%20getting%20attachments%20from%20SharePoint%20list%2Flibrary%20using%20Graph%20api%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-633285%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F188202%22%20target%3D%22_blank%22%3E%40sarawin%20kumar%20k%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDo%20you%20called%20the%20graph%20api%20endpoint%20that%20ends%20with%20%3CSTRONG%3E%2Fcontent%3C%2FSTRONG%3E%3F.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20example%3A%3C%2FP%3E%3CPRE%3E%3CSPAN%3EGET%20%2Fgroups%2F%7Bgroup-id%7D%2Fdrive%2Fitems%2F%7Bitem-id%7D%2Fcontent%3C%2FSPAN%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERefer%20below%20thread%20to%20know%20more%20details%20about%20how%20to%20download%20SharePoint%20file.%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fdriveitem-get-content%3Fview%3Dgraph-rest-1.0%26amp%3Btabs%3Dcs%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fdriveitem-get-content%3Fview%3Dgraph-rest-1.0%26amp%3Btabs%3Dcs%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hi All,

I unable to get the actual attachement from the SharePoint list/library using the Microsoft graph api,

I am only getting the response as " Attachement: True" in the response.Please let me know is there any way to get the attachments from SharePoint.

1 Reply
best response confirmed by sarawin kumar k (New Contributor)
Solution

@sarawin kumar k 

 

Do you called the graph api endpoint that ends with /content?.

 

For example:

GET /groups/{group-id}/drive/items/{item-id}/content

 

Refer below thread to know more details about how to download SharePoint file.

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

www.000webhost.com