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 node4.2) -
Using client credentials (app-only) token for Microsoft Graph.
Permissions on the Azure app registration
All permissions granted
What I’ve already checked
-
-
In Graph Explorer,
GET /drives/<DRIVE_ID>/items/<ITEM_ID>?$select=id,name,webUrlsucceeds and returns the file (so the IDs are valid).
→ But calling/contentthere sometimes 302-redirects to a SharePointdownload.aspxURL. -
Token audience is
graph.microsoft.com; decoded token showsroles: ["Sites.Read.All"]. -
Tried both with and without extra headers (e.g.,
Accept: */*). -
Confirmed
Follow Redirectson the node is enabled and Response Format is File.
-
Question(s)
-
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?
-
Any known constraints when the
<ITEM_ID>is a folder (does/content404 by design for folders)?