Authorization failed - please check your credentials. You do not have permissions to open this file in the browser

Describe the problem/error/question

When running a cron schedule at 12am, it always generates an error: “Authorization failed - check your credentials. You do not have permission to open this file in the browser.”. This scheduling sometimes works when I open an n8n tab on my device, but sometimes it still generates a credential error. However, when the device is closed, the schedule never works and always gives the credential error. Help me to resolve this. I have set up access to Excel files on OneDrive via Microsoft Azure.

Translated with DeepL.com (free version)

What is the error message (if any)?

Authorization failed - please check your credentials. You do not have permissions to open this file in the browser.

#the output returned by the last node
Authorization failed - please check your credentials. You do not have permissions to open this file in the browser.
Error from Microsoft Excel 365
Error code: 401
Error message:
{ "error": { "code": "FileOpenUserUnauthorized", "message": "You do not have permissions to open this file in the browser.", "innerError": { "code": "unauthorizedUncategorized", "message": "Required authentication information for the resource is either missing or invalid.", "innerError": { "code": "FileOpenUserUnauthorized", "message": "You do not have permissions to open this file in the browser." }, "date": "2025-02-24T10:15:08", "request-id": "136faeaf-213c-4d0c-a2eb-09a9de481ae8", "client-request-id": "136faeaf-213c-4d0c-a2eb-09a9de481ae8" } } }

Information n8n setup

  • n8n version: 1.80.2
  • Database (default: SQLite): Postgres
  • n8n EXECUTIONS_PROCESS setting (default: own, main): regular
  • Running n8n via (Docker, npm, n8n cloud, desktop app): docker (self-hosted)
  • Operating system: Debian


That’s a weird issue. But I have a guess:

The error indicates that the OAuth token or the session credentials used to access the Excel file via OneDrive aren’t valid for a non-interactive (background) execution.

Your authentication may be tied to a user session that is active only when you’re logged in.

Please try to review your Microsoft Azure credentials configuration.

See documentation for more info.

If my reply answers your question, please remember to mark it as a solution.

Hey @raihanfathulb were you able to solve this issue?

If yes, then choose a solution to mark this topic as closed, please.

Hi, sorry for the late response, I had to attend to some other matters first.

@gmsalomao2

I have followed the steps mentioned in the previous documentation regarding the Microsoft Azure credentials configuration, but the issue persists. I am still facing difficulties with the OAuth token or session credentials being invalid for non-interactive (background) execution.

I hope you can assist me further in resolving this issue.

Thank you for your help!