cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

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
Highlighted
Community Support
Community Support

 

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
Highlighted
Community Support
Community Support

 

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

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (12,669)