web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / 504 Bad Gateway when r...
Power Automate
Unanswered

504 Bad Gateway when running "Find files in folder by path" action for OneDrive for Business connection

(0) ShareShare
ReportReport
Posted on by 2

I have a flow which searches a user's OneDrive folder. It works for myself and the other users, apart from one. This user receives a 504 Bad Gateway error. 

 

Relevant Steps 

Failure 

 

I have had the user delete their connection to OneDrive and re-run the flow, but this has not helped. I have also had them run a simple flow which uses the "List files in root folder" action for OneDrive for Business, and this also seems to work for them.

 

What could be the issue with this user not being able to search their OneDrive for Business?

Categories:
I have the same question (0)
  • v-alzhan-msft Profile Picture
    on at

    Hi @adamswanson ,

     

    Could you please share more details about the error message in the flow?

    I have made a test on my side and don't have the issue that you mentioned.

    Please set the File Search Mode field to OneDriveSearch. Within Folder Path field, type your Folder Path manually, and the query field could be file type such as docx, xlsx.

    1.png

    Hope the link below could be your referance:

    https://powerusers.microsoft.com/t5/Building-Flows/Find-files-in-folder/td-p/113605

     

    Best Regards,

    Alice

     

    Community Support Team _ Alice Zhang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

  • adamswanson Profile Picture
    2 on at

    Here is the full Headers and Body output from the flow:

     

    Headers

    Pragmano-cache
    Transfer-Encodingchunked
    x-ms-datasourceerror

    True

    x-ms-request-id75d0ac25-c2a0-4fb1-8cc3-320e...
    Timing-Allow-Origin*
    x-ms-apihub-cached-responsetrue
    Connectionclose
    Cache-Controlno-cache
    DateMon, 09 Mar 2020 16:09:36 G...
    X-AspNet-Version4.0.30319
    X-Powered-ByASP.NET
    Content-Typeapplication/json
    Expires-1
    Content-Length362

     

    Body

     

    {
     "error": {
     "code": 504,
     "source": "unitedstates-002.azure-apim.net",
     "clientRequestId": "75d0ac25-c2a0-4fb1-8cc3-320ebcc2c4d3",
     "message": "BadGateway",
     "innerError": {
     "status": 504,
     "message": "Request timed out.\r\n inner exception: A task was canceled.",
     "source": "api.connectorp.svc.ms"
     }
     }
    }

     

     

    Please remember, this is ONLY happening for some users. It works fine for others.

     

    Regarding your suggestion to try entering a the Folder Path and Search Query manually and switching to OneDriveSearch, this does not seem to error out for one of the users, but it also does not find the file in the search query for that user nor for myself. I suspect there is a bug in using OneDriveSearch: 

     

    Screenshot of the modified search step

    Screenshot of the contents of the searched folder

     

    As you can see from the screenshots, the file I am searching for exists, but does not come up using your suggested method.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard