cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Talha
Advocate II
Advocate II

List files in folder - Onedrive (Customize Path Not working) - Getting Bad Request

Hi...

i have created a flow integrated with PowerApp.. i am getting Folder Name from PowerApp (String Vaule)..

i used this folder name in Onedrive List files connector instead of selecting Last folder i used the string value (which i got from power apps), i am getting following error

 

BadRequest

{ "status": 400, "message": "API not found", "source": "127.0.0.1" }

 

the Same Folder Name(string value) used in FTP Server FTP works fine..

 

Item<Listfilesinfolder_Folder> contain string value PaulStreet

 

Capture.PNG

 

if i used the folder by selecting from Root Folder .. flow works fine..Capture2.PNG

 Please help me to resolve this...

Thnaks...

1 ACCEPTED SOLUTION

Accepted Solutions

This is because the value that is required by the "List files in folder" action is actually an ID, not a path.  OneDrive has a unique ID for each file/folder, which is preserve when you rename/move the file/folder -- and which is what the connector uses to communicate through the OneDrive API.

For FTP, since there is no such thing, the connector uses the path as the ID.  That is why it is working for you.

 

The right thing to do, would be to browse the folder, so that you will get the File/Folder ID.  And then, use the ID to make the call to list the files in the folder.  That is automatically done by the Flow UI.

 

If you want to do this through PowerApps, you will have to first make a call to "Get file metadata using path", and then from the response you can use the "ID".

 

image.png

 

HTH

View solution in original post

3 REPLIES 3
v-micsh-msft
Community Support
Community Support

Hi @Talha,

 

Thanks for reporting this.

It seems that currently the Folder input under OneDrive for Business "List files in folder" can't accept the dynamic content. I tested it and got the error message below:

"status": 404, "message": "The resource could not be found.", "source": "127.0.0.1"

Which indicates that it can't find the proper folder path based on the value input.

The error message you encounted should be related with the Parameter you specified, if you choose the "Ask in PowerApps" multiple times, it will generated the API error.

I have forwarded from my side, if I have any feedback, I will post here.

Regards

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

This is because the value that is required by the "List files in folder" action is actually an ID, not a path.  OneDrive has a unique ID for each file/folder, which is preserve when you rename/move the file/folder -- and which is what the connector uses to communicate through the OneDrive API.

For FTP, since there is no such thing, the connector uses the path as the ID.  That is why it is working for you.

 

The right thing to do, would be to browse the folder, so that you will get the File/Folder ID.  And then, use the ID to make the call to list the files in the folder.  That is automatically done by the Flow UI.

 

If you want to do this through PowerApps, you will have to first make a call to "Get file metadata using path", and then from the response you can use the "ID".

 

image.png

 

HTH

View solution in original post

Thanks Sameer...

By using ID, List files in folder - Onedrive connected woking...

 

Thanks again..

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Users online (79,152)