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

Copy File Action - Access Denied Error

We have to copy file from source to destination on file modification.

Here is the screenshot of Flow.

Copy File Error.jpg

It is giving access denied error on copy file action for a single excel file.

We checked the user account that is configured on this Flow has full control access on both source and destination

Does this belongs to some content restrictions in Excel ? 

Error Message :

IM Renderer Page

{
  "status": 400,
  "message": "Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
  CallStack --    at Microsoft.SharePoint.SPGlobal.HandleUnauthorizedAccessException(UnauthorizedAccessException ex, Boolean allowCompleteRequest)\r\n  
  at Microsoft.SharePoint.Library.SPRequest.GetGroupsDataAsSafeArray(String bstrUrl, UInt32 dwGroupsScope, String bstrValue, UInt32 dwValue,
  UInt32& pdwColCount, UInt32& pdwRowCount, Object& pvarDataSet)\r\n   at Microsoft.SharePoint.SPGroup.InitMember()\r\n
  at Microsoft.SharePoint.SPGroup..ctor(SPWeb web, SPSecurableObject scope, SPUser user, String GroupName, Object[,]
  arrGroupsData, UInt32 index, Int32 iByParamId, SPGroupCollectionType groupCollectionType, Nullable`1 maxFieldIndex)\r\n  
  at Microsoft.SharePoint.SPGroupCollection.GetByIDNoThrow(Int32 id)\r\n   at Microsoft.SharePoint.SPGroupCollection.GetByID(Int32 id)\r\n  
  at Microsoft.SharePoint.Deployment.ExportObjectManager.AddUserGroupLookup(Int32 pid)\r\n  
  at Microsoft.SharePoint.Deployment.ListItemSerializer.SaveListItem(DataRow liData, String relation, String mvlRelation,
  SerializationInfo info, SPWeb parentWeb, ExportObjectManager objectManager)\r\n  
  at Microsoft.SharePoint.Deployment.ListItemSerializer.GetDataFromDataSet(Object obj, SerializationInfo info, StreamingContext context)\r\n  
  at Microsoft.SharePoint.Deployment.DeploymentSerializationSurrogate.GetObjectData(Object obj, SerializationInfo info, StreamingContext context)\r\n
  at Microsoft.SharePoint.Deployment.XmlFormatter.SerializeObject(Object obj, ISerializationSurrogate surrogate, String elementName, Boolean bNeedEnvelope)\r\n
  at Microsoft.SharePoint.Deployment.XmlFormatter.Serialize(Stream serializationStream, Object topLevelObject)\r\n
  at Microsoft.SharePoint.Deployment.SPExport.SerializeObjects()\r\n   at Microsoft.SharePoint.Deployment.SPExport.Run()\r\nclientRequestId:
  9ebfe42e-b163-4c22-8390-c0ae68286a25\r\nserviceRequestId: 803b9

 

Request to share what can  be done here. Anybody faced this issue earlier ??

4 REPLIES 4
Community Support Team
Community Support Team

Re: Copy File Action - Access Denied Error

Hi @manjotsingh057,

 

According to your description, I created a flow to copy file from source to destination when a file is modified in a folder. It worked fine, the file can be copied successfully.

1.PNG2.PNG

Per my certain research, the error message means that the user doesn’t have permission to complete the task.  The user may need ManageLists permission in order to perform this action, which is not part of the contributor role. Please check the permission on your side and try again with it.

If you are still having the issue, please feel free post back.

 

Best regards,

Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
manjotsingh057
Level: Powered On

Re: Copy File Action - Access Denied Error

@v-yamao-msft

We are running flows under a common generic account. It has full control on site as well as that particular library and file for which we got the error.

Flow runs successfully for other files in that same folder but failing for that particular excel file only.

 

We tried to download the file and upload it again. It failed everytime.

Is there any restriction on what content can be there in the file for it to get copied ???

 

 

Mahi
Level: Powered On

Re: Copy File Action - Access Denied Error

I have used service account. Also i have given full control access to service account, still i am facing same issue. Please suggest.

Thulthun
Level: Power Up

Re: Copy File Action - Access Denied Error

my conception:

I had a Powerapps triggered flow which was meant to create/modify items in a SharePoint list. We have an account with full access and the flow was configured to use it as default connection, still, it was giving access denied error when it was trying to create the new item.

 

my solution:

I have changed the Powerapps trigger to an HTTP call in the above-mentioned flow of mine. And created another flow, with a Powerapps trigger, which will send the variables coming from Powerapps through the HTTP POST method with JSON objects. 
I think the Powerapps trigger has its own connection which has overwritten the default one. But this way, I have ensured that it will use the full access account when modifying the database.

I hope this might be useful for you guys. 

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 Kudoed Authors (Last 30 Days)
Users online (4,131)