I'm pretty new to Power Automate and can't seem to figure out this problem. I'm currently taking a Microsoft submitted Form, capturing the data, creating a SharePoint folder based on the user that filled out the form, and creating an Excel file with their data in it. All seems to be going well, but the file will not create on the SharePoint folder. The new folder will create, but OneDrive specifically, gives a 401 error - Unauthorized. I can see the shared library for it, and I'm the Owner of the SharePoint directory, but it's for some reason not creating. I looked online for solutions (https://powerusers.microsoft.com/t5/I-Found-A-Bug/Unauthorized-Error-with-OneDrive-for-Business/td-p...) but it seems to be outdated or something, because the Gear doesn't have that setting.
Thanks for your response and here are a few screenshots I took.
When changing the location to my personal OneDrive, the file creates just fine. I also changed the location from the SharePoint "Copy Link" directory to "Full Path" after making the folder. When changing this, it says success, but the file is still not created, so it looks like it's still a permissions issue.
Thanks for the screenshot.
If you want to upload the file in SharePoint you need to parse the upload file JSON. The technique is showed here in this video.
Here is another blog post from super Yash 🙂 @yashag2255
Thanks for the links. I'm going to implement them, but it looks like the JASON Parse is used if a user attaches a document to the form. In my case, it doesn't contain anything like that, and the file creates on my personal drive, so it looks like there's just a bug permissions issue.
Thanks for the help so far!
So users don't upload any documents in your form?
I can see here you are trying to create filecontent as list of responses? What does the onedrive file content contains?
It's an on-boarding questionnaire, so it's text responses and some bubble in responses. The file path is the newly created SharePoint folder from above, the file name is the submitter's first and last name, and the file content are the responses.
Check out the News & Announcements to learn more.
Participate in the Power Virtual Agents Community Challenge
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.
DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.