Graph 404 when using HTTP Request node to GET /drives/{driveId}/items/{itemId}/content (SharePoint file download)

Title

Graph 404 when using HTTP Request node to GET /drives/{driveId}/items/{itemId}/content (SharePoint file download)

Tags

http-request microsoft-graph sharepoint oauth2

What I’m trying to do
Download a file from a SharePoint document library via Microsoft Graph using the n8n HTTP Request node, then process it downstream.

Endpoint

GET https://graph.microsoft.com/v1.0/drives/<DRIVE_ID>/items/<ITEM_ID>/content

Node configuration (HTTP Request):

  • Method: GET

  • URL: https://graph.microsoft.com/v1.0/drives/<DRIVE_ID>/items/<ITEM_ID>/content

  • Authentication: None (manually sending header)

  • Headers

    • Authorization: Bearer <access_token>
  • Options → Response

    • Response Format: File

    • (Follow Redirects: enabled, Resolve With Full Response: enabled)

Error I get in n8n

Error code: 404
Full message: 404 - “”
Request (sanitized):
{ “headers”: { “authorization”: “Bearer *", “accept”: "application/json,text/html,application/xhtml+xml,application/xml,text/;q=0.9, image/;q=0.8, /;q=0.7” },
“method”: “GET”,
“uri”: “https://graph.microsoft.com/v1.0/drives/<DRIVE_ID>/items/<ITEM_ID>/content”,
“followRedirect”: true, “followAllRedirects”: true, “useStream”: true, “timeout”: 300000 }

Environment

  • n8n Cloud 1.106.3 (HTTP Request node 4.2)

  • Using client credentials (app-only) token for Microsoft Graph.

Permissions on the Azure app registration

All permissions granted

What I’ve already checked

    1. In Graph Explorer, GET /drives/<DRIVE_ID>/items/<ITEM_ID>?$select=id,name,webUrl succeeds and returns the file (so the IDs are valid).
      → But calling /content there sometimes 302-redirects to a SharePoint download.aspx URL.

    2. Token audience is graph.microsoft.com; decoded token shows roles: ["Sites.Read.All"].

    3. Tried both with and without extra headers (e.g., Accept: */*).

    4. Confirmed Follow Redirects on the node is enabled and Response Format is File.

Question(s)

  1. Does the HTTP Request node preserve the Authorization header across 302 redirects (Graph → SharePoint download URL), or do I need a different setting/credential type so the redirect can succeed?

  2. Any known constraints when the <ITEM_ID> is a folder (does /content 404 by design for folders)?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.