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 / Badrequest error 400 O...
Power Automate
Unanswered

Badrequest error 400 Onedrive for business

(0) ShareShare
ReportReport
Posted on by 5

Hi all,

 

I just started using Power Automate and I'm trying to retrieve a copied file and send it per mail.

The flow copies a file from one location to another one on Onedrive and then needs to send the copied file to some users.

The first part works fine, but when I try to use "Get file content" from Onedrive for business it will throw error 400 every time.

Yvalson_0-1694436943396.png

The entire flow is not finished yet so that's why there is currently 2 branches.

Things I tried:

Creating a Test.xlsx file in Onedrive -> Selecting this file directly in Power Automate -> overwriting it with the flow -> gives error

Using dynamic content "Path" -> gives error

Writing the path manually -> gives error

using dynamic content "Id" -> gives error

using dynamic content "name" and manually writing path -> gives error

 

The weird thing is that I use the last method in the  Run script 2 action as well and it works completely fine.

Yvalson_1-1694438247029.png

I must be forgetting something in order to fetch the file correctly, but I don't know what it is.

Categories:
I have the same question (0)
  • Verified answer
    ManishSolanki Profile Picture
    15,091 Super User 2025 Season 2 on at

    Hi @Yvalson 

     

    Pls pass the Id (unique identifier) from the "Create file" action in the "Get file content" to retrieve the content:

    ManishSolanki_0-1694444082948.png

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

    Thanks

  • Yvalson Profile Picture
    5 on at

    Thank you! worked immediately.

    Just one question though.

    What is the difference that makes the Excel script run using the dynamic content name while Get file content needs the Id?

  • ManishSolanki Profile Picture
    15,091 Super User 2025 Season 2 on at

    Hi @Yvalson 

     

    This is as per the design of "Get file" action of one drive connector. It accepts Id (Unique Identifier) of the file as input parameter to return the file content. Here are its details:

    OneDrive for Business - Connectors | Microsoft Learn

     

    Thanks

  • Michael E. Gernaey Profile Picture
    53,335 Super User 2025 Season 2 on at

    Morning

     

    You are using Get File Content, which is looking for the identifier not the path. If you want to use the path use Get File content with Path

     

    See my example below. where id and path both come from the Copy File action

     

    FLMike_0-1694447222408.png


    Cheers
    If you like my answer, please Mark it as Resolved, and give it a thumbs up, so it can help others
    Thank You
    Michael Gernaey MCT | MCSE | Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

     

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