cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Tobes
Level: Powered On

Permission issue with flow moving files in OneDrive for business

I am trying to solve a simple problem with a flow, but get intermittent failures with permissions that I just can't progress.

 

I have 2 mobile phones that my staff use to take photos.   The phones both have OneDrive for business set up to upload all photographs into the same Camera Roll/2019 folder, using the same dedicated account (called Resource Manager).

 

I have a flow that triggers every time a photo is uploaded to the Camera Roll Folder, using the same Resource Manager account.  It sorts the uploaded files according to what they are.

 - All the videos are moved to a folder according to the year / month they were created

 - All the photos are moved to a different folder according to year / month / week and day of creation

 

The flow works out all the dates and folders correctly, however I get intermittent failures at the step where it tries to actually move the file. It always comes up with a 403 Forbidden error.

 

I have worked out that:

1. The failures always seem to happen with files uploaded from one of the phones.

2. The flow then keeps failing for all files, no matter which phone uploaded them

3. If I manually clear out the upload directory, the flow usually seems to start working again.

4. It can run loads of times before failing.

5. The phones do use different file naming conventions, so the offending one does create longer filenames.

The uploads to OneDrive and the flow all run on the same user account so there shouldn't be any file permission issues.

 

I created a batch version of the flow that does the same thing.  Triggered from a button and processing all the files it the directory (well, 20 at a time because of the limitations in the function).  This develops the same problems as above.

 

Can anyone give me an idea why a flow running with the permissions of the account that created the file should sometimes be unable to move it to a different folder within the same account, or what to try next?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Permission issue with flow moving files in OneDrive for business

 

Hi @Tobes ,

 

From the error message, this seems to be related to permissions. Have you tried using "Get file content-Create file" to implement the need to move files?

 

Best Regards,

Community Support Team _ Barry
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
Community Support Team
Community Support Team

Re: Permission issue with flow moving files in OneDrive for business

 

Hi @Tobes ,

 

From the error message, this seems to be related to permissions. Have you tried using "Get file content-Create file" to implement the need to move files?

 

Best Regards,

Community Support Team _ Barry
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

Tobes
Level: Powered On

Re: Permission issue with flow moving files in OneDrive for business

Thanks.  Yes I've been running it a while and its a lot more stable than the move I was using before.

Helpful resources

Announcements
firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,834)