Search a folder in OneDrive Node does not find an existing folder

Describe the problem/error/question

I built a workflow with a Onedrive Node, where i search for a folder. Last week it worked. Now it does not work any more. In the trial period it was working. Now it stopped to work.

What is the error message (if any)?

No output data returned

Please share your workflow

{
“nodes”: [
{
“parameters”: {
“resource”: “folder”,
“operation”: “search”,
“query”: “invoices-2026”
},
“type”: “n8n-nodes-base.microsoftOneDrive”,
“typeVersion”: 1.1,
“position”: [
-304,
0
],
“id”: “158b646c-0aa3-4af3-955f-1ada628a2d49”,
“name”: “Search a folder - invoice folder”,
“alwaysOutputData”: false,
“notesInFlow”: false,
“credentials”: {
“microsoftOneDriveOAuth2Api”: {
“id”: “xxxxxxxx”,
“name”: “Microsoft Drive account 5”
}
}
}
],
“connections”: {
“Search a folder - invoice folder”: {
“main”: [

]
}
},
“pinData”: {},
“meta”: {
“templateCredsSetupCompleted”: true,
“instanceId”: “c9c8859046caf13dc47bf4c8963a3344f20f07d593d5a5245c40900294cd5203”
}
}

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 2.12.3
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud
  • Operating system: macos

When OneDrive stops finding folders that previously worked, the most common cause is a stale OAuth token. Microsoft tokens expire and the refresh can fail silently after account changes like ending a trial. Go to your credentials in n8n, open your Microsoft OneDrive OAuth2 credential, and reconnect it. That forces a fresh token.

If reconnecting does not fix it, test the same query directly in Graph Explorer (Graph Explorer | Try Microsoft Graph APIs - Microsoft Graph). The OneDrive search endpoint has an indexing layer that occasionally lags behind actual folder state. If the folder shows up in Graph Explorer but not in n8n, that is worth filing as a bug on the n8n GitHub repo.

the oauth thing is probably the culprit — microsoft tokens expire silently, especially after trial periods end or account changes. but since you said reconnecting didnt fix it, worth checking if the search endpoint is having issues. have you tested the same query in graph explorer? that’ll tell you if it’s an n8n credential problem or a microsoft indexing lag. if graph explorer shows the folder but n8n doesn’t, the oauth is probably fine and it’s worth filing on github.

Hi @shinchan

This bug has been reported already to the team on github.
A couple of workarounds:

  1. Try searching for the folder in the OneDrive web UI first (just use the search bar in your browser). This can trigger Microsoft’s indexing, and the folder may then become visible to n8n.

  2. If that doesn’t help, skip the Search operation entirely and use Get Children on the parent folder instead, then filter for the folder name you need. This operation doesn’t rely on Microsoft’s search index.

If you’re on a Business/M365 account, also check whether the folder lives in your personal OneDrive space. The n8n OneDrive node only searches your personal space, not SharePoint team sites.

Let me know if this works !

1 Like

thx for responses.

  • deleting the credentials and recreating a new one did not help
  • i created a new other folder and found it
1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.