GCC environment Get-PnPWeb command fails after using ClientId, Tenant, and Thumbprint flags with Connect-PnPOnline. The exact same commands with the same certificate and app registration set up works fine in a commercial tenant.
Expected behavior
Being able to connect to the site successfully to pull data using the Azure App Registration authentication.
Actual behavior
I have my $ErrorActionPreference set to Stop and am outputting the Exception message to a log file - this is what's coming through in my log files.
12/10/2020 14:21:00:588 PM - Access denied. You do not have permission to perform this action or access this resource.
Steps to reproduce behavior
Please include complete code samples in-line or linked from gists
# Connect to SharePoint site
Connect-PnPOnline -Url $site.URL -ClientId $clientId -Tenant $tenant -Thumbprint $thumbprint
$web = Get-PnPWeb -Includes RoleAssignments
Which version of the PnP-PowerShell Cmdlets are you using?
[ ] PnP PowerShell for SharePoint 2013
[ ] PnP PowerShell for SharePoint 2016
[ ] PnP PowerShell for SharePoint 2019
[x] PnP PowerShell for SharePoint Online
What is the version of the Cmdlet module you are running?
3.26.2010.0 <- Current running
3.25.2009.1 <- Also tested using this one
(you can retrieve this by executing Get-Module -Name sharepointpnppowershell* -ListAvailable)
How did you install the PnP-PowerShell Cmdlets?
[ ] MSI Installed downloaded from GitHub
[x] Installed through the PowerShell Gallery with Install-Module
Reporting an Issue or Missing Feature
GCC environment Get-PnPWeb command fails after using ClientId, Tenant, and Thumbprint flags with Connect-PnPOnline. The exact same commands with the same certificate and app registration set up works fine in a commercial tenant.
Expected behavior
Being able to connect to the site successfully to pull data using the Azure App Registration authentication.
Actual behavior
I have my $ErrorActionPreference set to Stop and am outputting the Exception message to a log file - this is what's coming through in my log files. 12/10/2020 14:21:00:588 PM - Access denied. You do not have permission to perform this action or access this resource.
Steps to reproduce behavior
Please include complete code samples in-line or linked from gists
Which version of the PnP-PowerShell Cmdlets are you using?
What is the version of the Cmdlet module you are running?
3.26.2010.0 <- Current running 3.25.2009.1 <- Also tested using this one (you can retrieve this by executing
Get-Module -Name sharepointpnppowershell* -ListAvailable
)How did you install the PnP-PowerShell Cmdlets?