I am trying to create list items with Microsoft Graph API to a SharePoint endpoint. My URL is as follows:

https://graph.microsoft.com/v1.0/sites/{id}.sharepoint.com:/sites/{name of the site}:/lists/{list_id}/items

Calling this URL with POST, and a body like this:

    "fields": {
        "FileLeafRef": "757391.pdf",
        "ContentType": "Document",
        "Application_x0020_Name": "ABC",

It is giving error as "message": "Files and folders should only be added to a DocumentLibrary via the OneDrive API"

Can some one help on this, how to fix this issue? Here I am trying to create metadata for document, with in a list from Dell Boomi.

1 Answer 1


The error message is already clear. You can use graph API for SharePoint site when you create a List item only. For files and folder, you need to switch to Graph API for OneDrive

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.