I am trying to add contents and an attachment from a Form to a SharePoint list. However, the Get file content using path action in my flow is failing. The error I'm receiving says "Unauthorized" and in the file content box, I receive the following message:
"status": 401, "message": "A potentially dangerous Request.Path value was detected from the client (?).", "source": "apidod.connectorp.svc.ms"
The file path is as follows (minus the front of the path):
sites/HSMWINGATLANTIC_Supply_Requests/Shared Documents/Forms/AllItems.aspx?newTargetListUrl=/sites/HSMWINGATLANTIC_Supply_Requests/Shared Documents&viewpath=/sites/HSMWINGATLANTIC_Supply_Requests/Shared Documents/Forms/AllItems.aspx&id=/sites/HSMWINGATLANTIC_Supply_Requests/Shared Documents/Apps/Microsoft Forms Fairfax/Vehicle Rental Request/Supporting Documents&viewid=55590b8b-4994-4e8b-804b-24f4774c21e920220815 - HSM-40 Truck Request for 15 AUG 20_Charles Power 1.pdf
CodePudding user response:
c.d.power
For that Get File content using path you would need a relative path without the site url part. You can actually extract the correct path with an expression.
In the example below I retrieve the link property from the Attachment question answer value. I use a
CodePudding user response:
I found the solution to the issue. This wasn’t working because it is a group form and form responses are sent to the group’s SharePoint site; not the user’s OneDrive. Therefore, the Get file content action should be using the SharePoint connector instead of OneDrive.