Microsoft Graph file integrations: What to check before April 2027

Microsoft Graph has become an essential part of developing applications and integrations across Microsoft 365. Whether you’re building a custom application, automating file processing, or integrating SharePoint and OneDrive with external systems, there’s a good chance you’ve interacted with Microsoft Graph at some point. 

However, Microsoft has announced an important change to how certain file operations handle authentication, and depending on how your integrations are built, this could require changes before April 2027. 

Starting 1 April 2027, SharePoint Online and OneDrive will begin retiring pre-authenticated URLs returned by affected Microsoft Graph file APIs. 

This might seem like a relatively minor authentication change, but applications that depend on these URLs could encounter failures when downloading, uploading, previewing, or processing files. 

Let’s look at what’s changing, why Microsoft is making this change, and how developers can prepare. 

Understanding Pre-Authenticated URLs

When an application requests a file through certain Microsoft Graph APIs, the API may return a temporary URL that allows the application to access the file directly. 

These URLs can contain a temporary authentication token embedded within the URL itself. 

For example: 

https://contoso.sharepoint.com/sites/project/ 

				
					_layouts/15/download.aspx 
?UniqueId=<file-id>&tempauth=<temporary-token>
				
			

Because the URL already contains authentication information, the application can retrieve the file without providing a separate access token in the HTTP authorisation header. 

This approach has been convenient for developers because it reduces the authentication steps involved in retrieving file content. 

However, it also introduces potential security concerns. 

URLs can be captured in application logs, browser histories, monitoring systems, and other locations where sensitive information might be unintentionally exposed. 

Even though these tokens are short-lived and scoped to individual resources, Microsoft is moving towards a more consistent authentication approach using Microsoft Entra ID. 

What's changing?

From 1 April 2027, affected file API responses will no longer rely on authentication tokens embedded in URLs. 

Microsoft is changing two behaviours that developers should understand. 

The first involves HTTP redirects. Some file operations currently return a 302 response directing the client to a pre-authenticated download URL. Under the new behaviour, affected operations will return content directly instead of relying on that redirect. 

Applications that explicitly intercept these redirects or expect a Location header may need modification. 

The second involves URLs returned in API responses. Some operations return a URL inside a response body that the application subsequently calls to retrieve content or perform an operation. 

Under the new behaviour, these URLs will no longer contain an embedded authentication token. 

Instead, the application must present an appropriate Microsoft Entra ID access token when making the request. 

This introduces an additional consideration: the token must be issued for the service receiving the request. 

Which Microsoft Graph APIs are affected?

Microsoft has identified six API families associated with this transition: 

API operation 

Typical use case 

Download a file 

Retrieving SharePoint or OneDrive content 

createUploadSession 

Uploading large files in chunks 

Long-running operations 

Copying files and monitoring progress 

driveItem: preview 

Generating file previews 

Thumbnail retrieval 

Displaying document or image previews 

File conversion 

Converting supported file formats 

Not every Microsoft Graph file operation is affected in exactly the same way. 

For example, Microsoft’s driveItem/contentStream API already returns file content directly without relying on these temporary authentication URLs. 

Developers should review their actual API usage rather than assuming every integration requires modification. 

The important difference between Graph and SharePoint access tokens

One of the easiest mistakes to make during this migration is assuming an existing Microsoft Graph access token can be used to call any URL returned by Graph. 

That’s not necessarily correct. 

Access tokens are issued for specific audiences. A token intended for Microsoft Graph isn’t automatically valid for a SharePoint Online endpoint. 

For example: 

Microsoft Graph audience: 
https://graph.microsoft.com 
 
SharePoint Online audience: 
https://contoso.sharepoint.com 

If an integration calls Microsoft Graph to retrieve a file operation URL and receives a SharePoint Online URL, the application may need a separate access token for SharePoint. 

That token must be requested using appropriate Microsoft Entra ID authentication and permissions. 

Developers should also review whether their integration uses delegated authentication or application permissions. 

A user-initiated application may use delegated permissions, while an unattended background service may require application permissions. 

The correct approach depends on the authentication model and the operation being performed. 

What are the migration options?

Microsoft has outlined two approaches:

Option 1: Authenticate directly with SharePoint Online

Where an affected operation returns a SharePoint Online URL, the application can obtain a Microsoft Entra ID access token for the SharePoint resource. 

That token is then included in the HTTP request: 

				
					GET /sites/project/_layouts/15/... HTTP/1.1 
Host: contoso.sharepoint.com 
Authorization: Bearer <sharepoint-access-token> 

				
			

The example above illustrates the authentication pattern rather than a complete file-download request. 

The important point is that the token is supplied through the Authorization header rather than embedded in the URL. 

Applications using this approach may require changes to their authentication configuration, token acquisition logic, and app-registration permissions. 

Option 2: Use Microsoft Graph URLs where supported

Microsoft is also introducing an opt-in approach that allows supported operations to return Microsoft Graph URLs instead of SharePoint Online URLs. 

This would allow applications to reuse an existing Graph access token rather than acquiring a separate SharePoint token. 

However, the availability of this option depends on the applicable SharePoint Online Management Shell functionality and the operation being used. Developers should verify the published implementation and cmdlet support rather than assuming it’s available for every API today. 

The two approaches aren’t necessarily interchangeable, and some integrations may require both. 

How to identify integrations that could break

I would start by reviewing applications, custom connectors, scripts, and services that interact with Microsoft Graph file APIs. 

Look for code or configuration referencing: 

				
					tempauth 
@microsoft.graph.downloadUrl 
uploadUrl 
getUrl 
Location 
allowAutoRedirect 
				
			

These aren’t all indicators of a problem by themselves, but they can help identify integrations that depend on temporary URLs or redirect behaviour. 

It’s also worth reviewing any application that stores returned file URLs in Dataverse, sends them between services, or places them into queues for later processing. 

A temporary URL should never be treated as a permanent access mechanism. 

Once the affected integrations have been identified, review their authentication flows and determine whether they can support the new token requirements. 

For enterprise applications, I’d recommend testing the changes in a dedicated environment before deploying them to production. 

Microsoft has also provided configuration options for testing the new behaviour ahead of the retirement date.

What about Power Automate and Custom Connectors?

Power Automate developers should pay particular attention to flows that use HTTP actions or custom connectors to interact directly with Microsoft Graph. 

A flow using a standard Microsoft-managed connector isn’t necessarily affected simply because that connector interacts with SharePoint or OneDrive internally. 

However, if you’ve created a custom integration that retrieves a temporary file URL and subsequently calls it without authentication, the flow may require changes. 

The same applies to applications using Azure Functions, Logic Apps, custom APIs, or Power Platform integrations. 

The important factor isn’t which product the integration was built with. It’s whether the implementation relies on pre-authenticated URLs. 

Final thoughts

Microsoft’s decision to retire pre-authenticated URLs reflects a broader shift towards consistent, identity-based authentication across Microsoft 365 services. 

From a security perspective, removing authentication tokens from URLs is a sensible direction. 

However, developers need to understand the implications for existing integrations, particularly those built around assumptions about redirects, temporary URLs, and access-token audiences. 

With the transition beginning in April 2027, there’s still time to identify affected applications, review their authentication patterns, and implement the necessary changes. 

I would particularly encourage developers to review integrations that have been running quietly in the background for years. These are often the solutions that receive the least attention until something unexpectedly stops working. 

A successful integration shouldn’t depend on an authentication behaviour that the platform no longer guarantees. 

References

More insights

Get started on the right path to cloud success today. Our Crew are standing by to answer your questions and get you up and running.