Data Import & Export

Fix Excel Invalid Token Error When Using OneDrive Link in Get Data From Web

Elise WilliamsElise Williams Nov 13, 2026 869 views

Question details

The user needs to resolve the invalid token error that appears when using a copied OneDrive file link in Excel's Get Data From Web feature.

Fix Excel Invalid Token Error When Using OneDrive Link in Get Data From Web
Product
Microsoft Excel and OneDrive
Device & OS
not provided
Scenario
Importing data from a OneDrive-hosted file into Excel using the Data > Get Data > From Web feature.
Observed behavior
Excel returns an invalid token error because the copied OneDrive link is not a supported web query authentication link.
Before you start

Confirm the file is shared with the correct permissions in OneDrive on the web, and avoid reusing a link copied from an Office document because it may contain a session-specific token.

Solution 1Recommended

Get Current OneDrive Link and Authentication Guidance from OneDrive Support

Use this solution when Excel returns an invalid token error, because OneDrive sharing links and authentication methods change and Microsoft provides the current supported options.

1
Sign in to OneDrive on the web

Open a browser, go to onedrive.com, and sign in with the Microsoft account that has access to the file.

2
Open OneDrive Help

Click the Help icon in the upper-right corner of OneDrive on the web.

3
Email OneDrive Support

Select Email OneDrive Support and follow the prompts to describe the invalid token error in Excel Get Data From Web.

4
Check the OneDrive Help Center

Search the OneDrive Help Center for supported sharing links and authentication methods if you prefer self-service guidance.

Get Current OneDrive Link and Authentication Guidance from OneDrive Support
You've contacted the right support: Microsoft OneDrive Support can confirm the correct share link type and authentication flow for your specific file and account.
Free Microsoft Office alternative

Switch to WPS Office for Familiar Spreadsheet Editing and Web Data Import

WPS Office is a free, lightweight Office alternative that opens and edits Excel workbooks with familiar tools, supports Microsoft Excel file formats, and gives you a straightforward spreadsheet environment for data import tasks.

Free to download and use for spreadsheets, documents, and presentations.Opens and saves .xlsx and .xls files with Microsoft Excel format compatibility.Familiar Office-style ribbon makes it easy to migrate from Microsoft Excel.Includes data import and web query tools in WPS Spreadsheets.Lightweight installation with no need for a Microsoft 365 subscription.
microsoft office alternative - wps office

Frequently Asked Questions

Why does Excel Get Data From Web show an invalid token error with my OneDrive link?

Excel returns this error when a OneDrive link copied from an Office document contains a session-specific authentication token or uses a sharing method that Get Data From Web does not support. Use a fresh OneDrive share link from onedrive.com with the correct permission instead.

How do I create a supported OneDrive link for Excel Get Data From Web?

Sign in to onedrive.com, select the file, click Share, choose a permission such as Anyone with the link or People in your organization, copy the link, and paste it into Excel's Data > Get Data > From Web dialog.

Where can I get current OneDrive connection support?

Sign in to OneDrive on the web, select the Help icon, choose Email OneDrive Support, and follow the prompts. You can also search the OneDrive Help Center for supported sharing links and authentication methods.

Can WPS Office open Excel files that use Get Data From Web?

WPS Office opens .xlsx and .xls workbooks and includes spreadsheet data tools, but external web query connections may need to be refreshed or re-created after opening the file in WPS Spreadsheets.