Replies: 1 comment
-
I've also had this issue for certain site types when I was using a 'Sharepoint Administrator' to run get-pnptenant, using a Global Administrator account resolved this issue (and adding it as site collection owner) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Starting March 1 2023: Getting sporadic failure messages on the following cmdlet: Get-PnPTenantSite
PnP PowerShell version: 1.12.0
Function PS Core version: PowerShell 7.0
This is how I am using it in the Function App.
$ConfirmSite = Get-PnPTenantSite -Identity $SiteUrl | Select SharingDomainRestrictionMode
This is the error:
The property or field 'AllowDownloadingNonWebViewableFiles' has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested. Exception : Type : System.Management.Automation.PSInvalidOperationException ErrorRecord : Exception : Type : System.Management.Automation.ParentContainsErrorRecordException Message : The property or field 'AllowDownloadingNonWebViewableFiles' has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested. HResult : -2146233087 CategoryInfo : InvalidOperation: (:) [], ParentContainsErrorRecordException FullyQualifiedErrorId : InvalidOperation TargetSite : Name : ProcessRecord DeclaringType : PnP.PowerShell.Commands.Base.PnPConnectedCmdlet MemberType : Method Module : PnP.PowerShell.dll StackTrace : at PnP.PowerShell.Commands.Base.PnPConnectedCmdlet.ProcessRecord() in c:\build\src\Commands\Base\PnPConnectedCmdlet.cs:line 93 at PnP.PowerShell.Commands.PnPSharePointCmdlet.ProcessRecord() in c:\build\src\Commands\Base\PnPSharePointCmdlet.cs:line 122 at System.Management.Automation.Cmdlet.DoProcessRecord() at System.Management.Automation.CommandProcessor.ProcessRecord() Message : The property or field 'AllowDownloadingNonWebViewableFiles' has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested. Source : PnP.PowerShell HResult : -2146233079 CategoryInfo : InvalidOperation: (:) [Get-PnPTenantSite], PSInvalidOperationException FullyQualifiedErrorId : InvalidOperation,PnP.PowerShell.Commands.GetTenantSite InvocationInfo : MyCommand : Get-PnPTenantSite ScriptLineNumber : 21 OffsetInLine : 16 HistoryId : 1 ScriptName : C:\home\site\wwwroot\HttpTrigger1-LogicApp\run.ps1 Line : $ConfirmSite = Get-PnPTenantSite -Identity $SiteUrl | Select SharingDomainRestrictionMode PositionMessage : At C:\home\site\wwwroot\HttpTrigger1-LogicApp\run.ps1:21 char:16 + $ConfirmSite = Get-PnPTenantSite -Identity $SiteUrl | Select SharingD … + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PSScriptRoot : C:\home\site\wwwroot\HttpTrigger1-LogicApp PSCommandPath : C:\home\site\wwwroot\HttpTrigger1-LogicApp\run.ps1 InvocationName : Get-PnPTenantSite CommandOrigin : Internal ScriptStackTrace : at , C:\home\site\wwwroot\HttpTrigger1-LogicApp\run.ps1: line 21
Beta Was this translation helpful? Give feedback.
All reactions