cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kpartington-tr
Advocate I
Advocate I

OneDrive for Business ListFolderV2 action parses folder path incorrectly if folder has a period

I have a Flow where I'm trying to create a folder structure in my OneDrive for Business connection, and then wait for files to appear in a specific location before proceeding.

 

The CreateFile operation succeeds, but the ListFolderV2 operation fails.

 

CreateFile operation success:

 

01_CreateFile_Success.PNG

 

ListFolderV2 error:

 

02_ListFolderV2_Error.PNG

 

The output of the ListFolderV2 request is as follows:

 

{
"statusCode":400,
"headers": {"Pragma":"no-cache","Transfer-Encoding":"chunked","x-ms-request-id":"d8804d60-049d-4f88-947e-1403d2324006","Timing-Allow-Origin":"*","x-ms-apihub-cached-response":"true","Cache-Control":"no-cache","Date":"Fri, 16 Oct 2020 23:07:11 GMT","X-AspNet-Version":"4.0.30319","X-Powered-By":"ASP.NET","Content-Type":"application/json","Expires":"-1","Content-Length":"225"},
"body": {
"status": 400,
"message": "The expression \"drives('Documents')/work/eDP/DB Shepherd/Execution Logs/50/items('4')/Delete Old Predictive Coding Jobs/CI/children\" is not valid.",
"source":"api.connectorp.svc.ms"
}
}

 

So it seems that in the ListFolderV2 action, my "50.4" folder is being transformed into a "50/items('4')" call, almost as if it was trying to interpret "50.4" as an object property access.

 

I don't think we can just say that folders with dots aren't supported by the connector, because this issue does not occur on the CreateFile action as I demonstrated earlier. So, this does feel like a bug to me. But if this is truly per design, I would appreciate an explanation and/or reference to show what types of files and paths the OneDrive for Business connector should support.

 

Thanks in advance for your help!

1 ACCEPTED SOLUTION

Accepted Solutions
v-litu-msft
Community Support
Community Support

Hi @kpartington-tr,

 

It's not a bug. The Folder field of List files in a folder action accepts Folder identifier, not accept folder path. You should use Get file metadata using path to get the ID, then append it into Folder field, for example:

Screenshot 2020-10-20 142306.jpg

 

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

View solution in original post

2 REPLIES 2
v-litu-msft
Community Support
Community Support

Hi @kpartington-tr,

 

It's not a bug. The Folder field of List files in a folder action accepts Folder identifier, not accept folder path. You should use Get file metadata using path to get the ID, then append it into Folder field, for example:

Screenshot 2020-10-20 142306.jpg

 

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

View solution in original post

Thanks @v-litu-msft, you are absolutely right, I misread the docs. Sorry about that.

 

(Personally, I think it would help if the parameter's display name were renamed to "Folder ID" to avoid this issue in the future. But the docs do use "id" as the internal parameter name and I missed that-- my fault.)

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (2,061)