2020-12-08 19:11

Access Denied with SPDesignerSettings

Using the ReverseDSC to generate a script from a Farm already installed and configured I get this resource configuration:

$SetupAccount = Get-Credential -UserName "CORP\sp.setup" -Message "Credentials for CORP\sp.setup"

    SPDesignerSettings SiteCollection84a91272-e1b1-4f80-a1d6-efcda54e81b6
        Url = "http://mysites.corp.contoso.loc";
        PsDscRunAsCredential = $SetupAccount;
        AllowSharePointDesigner = $True;
        AllowDetachPagesFromDefinition = $False;
        SettingsScope = "SiteCollection";
        AllowCustomiseMasterPage = $False;
        AllowCreateDeclarativeWorkflow = $True;
        AllowSavePublishDeclarativeWorkflow = $True;
        AllowSaveDeclarativeWorkflowAsTemplate = $True;
        AllowManageSiteURLStructure = $False;

But when I start the DSC Configuration it gives me the following error:

PowerShell DSC resource MSFT_SPDesignerSettings failed to execute Set-TargetResource functionality with error message: Site collection not found. SharePoint Designer settings will not be applied + CategoryInfo : InvalidOperation: (:) [], CimException + FullyQualifiedErrorId : ProviderOperationExecutionFailure + PSComputerName : AZREPLICA01

Which is strange because the site collection exists. Looking at the ULS logs I can see that no User Identity is passed in the request:

SPRequest.OpenWeb: UserPrincipalName=, AppPrincipalName= ,bstrUrl=http://mysites.corp.contoso.loc System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

Versions used: Operating System: Windows Server 2016 (Version 1607)

PowerShell: PSVersion 5.1.14393.206 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.14393.206 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion


SharePoint 2016 (16.0.4456.1000)


  • 点赞
  • 回答
  • 收藏
  • 复制链接分享