Zerg00s / FlowPowerAppsMigrator

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

Error : Apply-PnPProvisioningTemplate : Access is denied. #34

Open ghazalsrs opened 1 year ago

ghazalsrs commented 1 year ago

Apply-PnPProvisioningTemplate : Access is denied. I get this error image

user has full control access on the site

Zerg00s commented 1 year ago

Hi @ghazalsrs,

Can you, please confirm you are a site collection administrator on the /sites/SP-UAT site?

Zerg00s commented 1 year ago

@ghazalsrs , can you, please share the Lists.xml file from the script folder? I can try running it against my test tenant to see if there is something wrong with the site template.

ghazalsrs commented 1 year ago

hi there, I set that account as site owner not SCA

Zerg00s commented 1 year ago

Hi @ghazalsrs. do you still experience an issue? Did setting up SCA fix this issue?

QJappie22 commented 1 year ago

Hi @Zerg00s, @ghazalsrs,

I had the same problem but I think I found my issue which is related to the language which was used while creating the destination sitecollection. Could it be that you, @ghazalsrs, have the same issue?

Try creating the destination sitecollection based on the same language you used to ceate the source sitecollection. Some languages use 'Id' in SharePoint lists where others use 'ID'. I created a Dutch destination sitecollection which uses 'ID' but found out that my source sitecollection was created with the English language which uses 'Id'.

After creating the sitecollection with the English language the script executed successfully.

SharePointSite_language

Zerg00s commented 1 year ago

@QJappie22

Thank you! I think you are right. I just tried migrating lists from an English to a Dutch site. image

As a result, I am also getting the 0x80070005 (E_ACCESSDENIED) error

image
Zerg00s commented 1 year ago

For now, I've added a message that will help people explain that the error occurs because of the language mis-match between the source and the targe sites:

image

But Ideally, I need to figure out if there is a better workaround. Not sure if it's going to be do-able because I am using the PnP PowerShell module