Zerg00s / FlowPowerAppsMigrator

Converts SharePoint Data sources for the MS Flow and PowerApps to a new tenant of your choice.
MIT License
135 stars 33 forks source link

Apply-PnPProvisioningTemplate : Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) #53

Open yusufshaikh22 opened 1 year ago

yusufshaikh22 commented 1 year ago

Hi @Zerg00s, While Importing existing list & libraries in target sit gives an error.

image

[Attention] Look for a login popup in a separate window. Please, log in to the source site site https://04xd3.sharepoint.com/sites/Federal Connected to the source site Site: https://04xd3.sharepoint.com/sites/Federal User: Firdos Shaikh (FirdosShaikh@04xd3.onmicrosoft.com) Mapping file resourceMapping.csv is generated C:\Users\YusufShaikh\Downloads\FlowPowerAppsMigrator\ Exporting lists and libraries... [Attention] Look for a login popup in a separate window. Please, log in to the target site https://t1jtk.sharepoint.com/sites/Federal.

Connected to the target site Site: https://t1jtk.sharepoint.com/sites/Federal User: Harsh Markad (ABC@t1jtk.onmicrosoft.com) Applying PnP Template to https://t1jtk.sharepoint.com/sites/Federal C:\Users\YusufShaikh\Downloads\FlowPowerAppsMigrator\ Importing lists and libraries... [Error] Make sure that both target site and the source sites created with the same language. Cross-language list migration is not supported. Apply-PnPProvisioningTemplate : Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) At C:\Users\YusufShaikh\Downloads\FlowPowerAppsMigrator\MISC\Move-Lists.ps1:124 char:9

But i have created one new list in same source site & import to same target site its exported successfully.

Zerg00s commented 1 year ago

Hi @yusufshaikh22 I assume that ABC@t1jtk.onmicrosoft.com has Full Control at the https://t1jtk.sharepoint.com/sites/Federal site?

In this case, it might be an issue that is difficult to troubleshoot. Would you be able to create 2 SharePoint-only app registration?

How to Register an App-only permissions app

image

image

image

image

Then you can fill out the config\migrator-config.json file with the required information and run the migratory again.

Zerg00s commented 1 year ago

Update: some site columns cause this issue

I have published a new release, in which I automatically remove several pesky site columns causing the Access Denied error.

For now, I remove only these two fields:

But I suspect more fields are causing this error. I will attempt to hunt down more of them and include them in future releases. If anyone gets the Access denied error, please, share the Lists.xml file with me so I can debug it and see which fields are responsible for this error.