cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

OneDrive Trigger - Unauthorized Error

Hello,

 

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. 

 

Exact error:

"status"401,
"message""Unauthorized",
"source""api.connectorp.svc.ms"
 
Can someone give any advice on how to get around this?
 
Kind regards,
Chris
7 REPLIES 7
abm
Super User III
Super User III

Hi @Anonymous 

 

Could you post your flow screenshot? Also try to remove the errored step and recreate the step with new connection.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials
Anonymous
Not applicable

Hey @abm 

 

Thanks for your response and here are a few screenshots I took.

 

PA1.png

 

PA2.png

 

P3.png

 

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. 

abm
Super User III
Super User III

Hi @Anonymous 

 

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.

 

https://www.youtube.com/watch?v=UKuzX8zlnuE

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials
abm
Super User III
Super User III

Hi @Anonymous 

 

Here is another blog post from super Yash 🙂  @yashag2255 

 

https://www.bythedevs.com/post/working-with-files-on-ms-forms-group-form-in-ms-power-automate

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials
Anonymous
Not applicable

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!

abm
Super User III
Super User III

Hi @Anonymous 

 

So users don't upload any documents in your form?

 

image.png

 

I can see here you are trying to create filecontent as list of responses?  What does the onedrive file content contains?



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials
Anonymous
Not applicable

@abm 

 

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.

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (1,313)