You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run the .deploy.ps the script encounters the following error:
powershell.exe Error: 0 : 2024-03-12 11:41:46.9536 [PnP.Framework] [0] [Error] ExecuteQuery threw following exception: Microsoft.SharePoint.Client.ServerUnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
This is the command which is failing: Invoke-PnPSiteTemplate -Path (Join-Path $packageRootPath $templatePath) -ClearNavigation (Line 319)
The script succeeds doing the following things:
Check for keyvaultname
Create sharepointsite
Login to AZ, azureAD, sharepointPNP, Microsoft graph
We also tried running the script using the serviceaccount specificed in the json parameter file for the sharepoint PNP login part of the script. (since this is the account which is specified in the json parameter file). We encountered the same results with this account.
Steps to reproduce
Create the application using createazureadapp.ps1 (We changed the scope of the application to internal/this tenant only, since the intended user audience is internal members of our tenant).
The account used has the following roles: Global admin, sharepoint admin, teams admin, subscription owner.
The account used has the following permissions on the sharepoint site: site owner, owner, site admin
Description
When I run the .deploy.ps the script encounters the following error:
powershell.exe Error: 0 : 2024-03-12 11:41:46.9536 [PnP.Framework] [0] [Error] ExecuteQuery threw following exception: Microsoft.SharePoint.Client.ServerUnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
This is the command which is failing: Invoke-PnPSiteTemplate -Path (Join-Path $packageRootPath $templatePath) -ClearNavigation (Line 319)
The script succeeds doing the following things:
We also tried running the script using the serviceaccount specificed in the json parameter file for the sharepoint PNP login part of the script. (since this is the account which is specified in the json parameter file). We encountered the same results with this account.
Steps to reproduce
1.12.0 PnP.PowerShell
1.2.2.1 WriteAscii
5.8.0 MicrosoftTeams
7.8.4 ImportExcel
2.11.0 Microsoft.Graph
11.3.1 Az
2.0.2.183 AzureADPreview
Expected results
The deploy script does not complete. Stuck on create sharepoint items.
Actual Results
Error message described above.
Solution component
Deployment Script
Operating system (environment)
Windows
Additional Info
No response
The text was updated successfully, but these errors were encountered: