An API that connects multiple Microsoft services, enabling data access and automation across platforms
Yes. The documented contract still says /content returns 302 Found to a preauthenticated download URL, and that this is the same URL exposed as @microsoft.graph.downloadUrl. The documentation also states that the download URL does not require an Authorization header and is short-lived.
Supported facts from the documentation:
-
GET /drives/{drive-id}/items/{item-id}/contentreturns302 Found. - The
Locationheader points to a preauthenticated download URL. - That URL is the same value exposed by
@microsoft.graph.downloadUrl. -
@microsoft.graph.downloadUrlis defined as a URL that can be used to download file content without authentication. - The URL is temporary and should be used immediately because it can expire within minutes; the driveItem resource page also states it is short-lived and cannot be cached.
For the observed 401 Unauthorized on the final SharePoint URL:
- That behavior does not match the documented expectation for
@microsoft.graph.downloadUrl. - The provided material does not state that
@microsoft.graph.downloadUrlhas been deprecated. - The provided material does not state that preauthenticated download URLs have been replaced for daemon or background download scenarios.
What the available material does show is that Microsoft still documents @microsoft.graph.downloadUrl as the intended mechanism in cases where the redirected /content URL must be consumed directly, including JavaScript/CORS scenarios.
There is one related limitation in the available material: behavior at the storage backend can vary in some scenarios when using the direct download URL. A Microsoft Q&A answer for range downloads states that direct use of @microsoft.graph.downloadUrl bypasses Graph and interacts directly with the file storage backend, and backend behavior may vary by scenario. That supports treating a 401 at the final URL as a service/backend behavior issue rather than as evidence of a documented contract change.
Based on the available material, the direct answers are:
- Is this behavior expected?
No, not according to the documented behavior for/contentand@microsoft.graph.downloadUrl. - Has the behavior recently changed?
No documented change is present in the available material. - Does Microsoft Graph still guarantee that
@microsoft.graph.downloadUrlis a preauthenticated download URL?
Yes, that is still how it is documented. - If preauthenticated download URLs are being deprecated, what is the replacement?
No deprecation or replacement is stated in the available material.
References: