Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ghazalsrs opened this issue Sep 28, 2022 · 7 comments
Open

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

ghazalsrs opened this issue Sep 28, 2022 · 7 comments

Comments

@ghazalsrs
Copy link

ghazalsrs commented Sep 28, 2022

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

user has full control access on the site

@Zerg00s
Copy link
Owner

Zerg00s commented Sep 28, 2022

Hi @ghazalsrs,

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

@Zerg00s
Copy link
Owner

Zerg00s commented Sep 28, 2022

@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
Copy link
Author

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

@Zerg00s
Copy link
Owner

Zerg00s commented Sep 28, 2022

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

@QJappie22
Copy link

QJappie22 commented Sep 30, 2022

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
Copy link
Owner

Zerg00s commented Sep 30, 2022

@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
Copy link
Owner

Zerg00s commented Sep 30, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants