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
Using M365DSC to deploy A SPO Site Design and Site Script.
When deployed once, it seems to look OK.
Although note that the Id of the SiteScript ff26c796-b4dd-4748-86ff-dad011e5eb4f doesn't match the Identity in the M365TenantConfig.ps1 a6a9f6ee-02c8-47b4-9d03-901c1a79dd33
When you deploy the second time, you can see that the the Site Script is deployed again with a different ID.
Microsoft 365 DSC Version
v1.25.122.2
Which workloads are affected
SharePoint Online
The DSC configuration
# Please note I have removed the URL GUID, and Signiture Key.param (
)
ConfigurationM365TenantConfig
{
param (
)
$OrganizationName=$ConfigurationData.NonNodeData.OrganizationNameImport-DscResource-ModuleName 'Microsoft365DSC'-ModuleVersion '1.25.122.2'
Node localhost
{
SPOSiteScript "SPOSiteScript-Apply company customisations"
{
ApplicationId =$ConfigurationData.NonNodeData.ApplicationId;
CertificateThumbprint =$ConfigurationData.NonNodeData.CertificateThumbprint;
Content ="{ `"$schema`": `"schema.json`", `"actions`": [ { `"verb`": `"setRegionalSettings`", `"locale`": 2057, `"sortOrder`": 25, `"hourFormat`": `"24`" }, { `"verb`": `"triggerFlow`", `"url`": `"https://prod-21.uksouth.logic.azure.com:443/workflows/[GUID-REMOVED]/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=[key-removed]`", `"name`": `"Apply company customisations`", `"parameters`": { `"event`": `"Microsoft Event`", `"product`": `"SharePoint`" } } ], `"bindata`": {}, `"version`": 1 }";
Ensure ="Present";
Identity ="a6a9f6ee-02c8-47b4-9d03-901c1a79dd33";
TenantId =$OrganizationName;
Title ="Apply company customisations";
}
SPOSiteDesign "SPOSiteDesign-Apply company customisations"
{
ApplicationId =$ConfigurationData.NonNodeData.ApplicationId;
CertificateThumbprint =$ConfigurationData.NonNodeData.CertificateThumbprint;
Description ="Default team site template, ensures company customisations are applied when the site is created via the request portal, otherwise a standard site";
Ensure ="Present";
IsDefault =$False;
SiteScriptNames =@("Apply company customisations");
TenantId =$OrganizationName;
Title ="Apply company customisations";
Version =1;
WebTemplate ="TeamSite";
}
}
}
M365TenantConfig -ConfigurationData .\ConfigurationData.psd1
Verbose logs showing the problem
Run 1:
VERBOSE: Perform operation 'Invoke CimMethod' with following parameters,''methodName' = SendConfigurationApply,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' = root/Microsoft/Windows/DesiredStateConfiguration'.
VERBOSE: An LCM method call arrived from computer mycomputer with user sid S-1-12-1-3691799957-1270395199-3808479900-2109869863.
VERBOSE: [mycomputer]: LCM: [ StartSet ]
VERBOSE: [mycomputer]: LCM: [ StartResource ] [[SPOSiteScript]SPOSiteScript-Applycompanycustomisations]
VERBOSE: [mycomputer]: LCM: [ StartTest ] [[SPOSiteScript]SPOSiteScript-Applycompanycustomisations]
VERBOSE: [mycomputer]: [[SPOSiteScript]SPOSiteScript-Applycompanycustomisations] Testing configuration for Site Script Apply company customisations
VERBOSE: [mycomputer]: [[SPOSiteScript]SPOSiteScript-Applycompanycustomisations] Getting Site Script: Apply company customisations
WARNING: [mycomputer]: [[SPOSiteScript]SPOSiteScript-Applycompanycustomisations]
A newer version of PnP PowerShell is available: 2.12.0.
Use 'Update-Module -Name PnP.PowerShell' to update.
Use 'Get-PnPChangeLog -Release 2.12.0' to list changes.
You can turn this check off by setting the 'PNPPOWERSHELL_UPDATECHECK' environment variable to 'Off'.
VERBOSE: [mycomputer]: [[SPOSiteScript]SPOSiteScript-Applycompanycustomisations] Getting the SPO Site Script: Apply company customisations
VERBOSE: [mycomputer]: [[SPOSiteScript]SPOSiteScript-Applycompanycustomisations] Connecting to the SharePoint Online Admin Center at 'https://mysp-admin.sharepoint.com' to run this cmdlet
VERBOSE: [mycomputer]: [[SPOSiteScript]SPOSiteScript-Applycompanycustomisations] Connected to the SharePoint Online Admin Center at 'https://mysp-admin.sharepoint.com' to run this cmdlet
VERBOSE: [mycomputer]: [[SPOSiteScript]SPOSiteScript-Applycompanycustomisations] Current Values: ApplicationId=***
CertificateThumbprint=***
Content={ "": "schema.json","actions": [ { "verb": "setRegionalSettings","locale": 2057,"sortOrder": 25,"hourFormat": "24" }, { "verb": "triggerFlow","url": "https://prod-21.uksouth.logic.azure.com:443/workflows/[GUID-REMOVED]/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=[key-removed]","name": "Apply company customisations","parameters": { "event": "Microsoft Event","product": "SharePoint" } } ],"bindata": {},"version": 1 }
Ensure=Absent
Identity=a6a9f6ee-02c8-47b4-9d03-901c1a79dd33
TenantId=***
Title=Apply company customisations
Verbose=True
VERBOSE: [mycomputer]: [[SPOSiteScript]SPOSiteScript-Applycompanycustomisations] Target Values: ApplicationId=***
CertificateThumbprint=***
Content={ "": "schema.json","actions": [ { "verb": "setRegionalSettings","locale": 2057,"sortOrder": 25,"hourFormat": "24" }, { "verb": "triggerFlow","url": "https://prod-21.uksouth.logic.azure.com:443/workflows/[GUID-REMOVED]/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=[key-removed]","name": "Apply company customisations","parameters": { "event": "Microsoft Event","product": "SharePoint" } } ],"bindata": {},"version": 1 }
Ensure=Present
Identity=a6a9f6ee-02c8-47b4-9d03-901c1a79dd33
TenantId=***
Title=Apply company customisations
Verbose=True
VERBOSE: [mycomputer]: [[SPOSiteScript]SPOSiteScript-Applycompanycustomisations] Test-TargetResource returned False
VERBOSE: [mycomputer]: LCM: [ EndTest ] [[SPOSiteScript]SPOSiteScript-Applycompanycustomisations] in29.7470 seconds.
VERBOSE: [mycomputer]: LCM: [ StartSet ] [[SPOSiteScript]SPOSiteScript-Applycompanycustomisations]
VERBOSE: [mycomputer]: [[SPOSiteScript]SPOSiteScript-Applycompanycustomisations] Setting Site Script: Apply company customisations
VERBOSE: [mycomputer]: [[SPOSiteScript]SPOSiteScript-Applycompanycustomisations] Getting Site Script: Apply company customisations
VERBOSE: [mycomputer]: [[SPOSiteScript]SPOSiteScript-Applycompanycustomisations] Getting the SPO Site Script: Apply company customisations
VERBOSE: [mycomputer]: [[SPOSiteScript]SPOSiteScript-Applycompanycustomisations] Site Script, {Apply company customisations}, doesn't exist. Creating it.VERBOSE: [mycomputer]: [[SPOSiteScript]SPOSiteScript-Apply company customisations] Waiting for another 3 seconds for Site Script to be ready.VERBOSE: [mycomputer]: [[SPOSiteScript]SPOSiteScript-Apply company customisations] Site Script, {Apply company customisations}, has been successfully created.VERBOSE: [mycomputer]: [[SPOSiteScript]SPOSiteScript-Apply company customisations] Site Script, {Apply company customisations} already exists, updating its settingsVERBOSE: [mycomputer]: LCM: [ End Set ] [[SPOSiteScript]SPOSiteScript-Apply company customisations] in 8.6300 seconds.VERBOSE: [mycomputer]: LCM: [ End Resource ] [[SPOSiteScript]SPOSiteScript-Apply company customisations]VERBOSE: [mycomputer]: LCM: [ Start Resource ] [[SPOSiteDesign]SPOSiteDesign-Apply company customisations]VERBOSE: [mycomputer]: LCM: [ Start Test ] [[SPOSiteDesign]SPOSiteDesign-Apply company customisations]VERBOSE: [mycomputer]: [[SPOSiteDesign]SPOSiteDesign-Apply company customisations] Testing configuration for SPO SiteDesign for Apply company customisationsVERBOSE: [mycomputer]: [[SPOSiteDesign]SPOSiteDesign-Apply company customisations] Getting configuration for SPO SiteDesign for Apply company customisationsVERBOSE: [mycomputer]: [[SPOSiteDesign]SPOSiteDesign-Apply company customisations] Getting Site Design for Apply company customisationsVERBOSE: [mycomputer]: [[SPOSiteDesign]SPOSiteDesign-Apply company customisations] No site designs with the identity provided through Identity have been foundVERBOSE: [mycomputer]: [[SPOSiteDesign]SPOSiteDesign-Apply company customisations] No Site Design found for Apply company customisationsVERBOSE: [mycomputer]: [[SPOSiteDesign]SPOSiteDesign-Apply company customisations] Current Values: ApplicationId=***CertificateThumbprint=***Description=Default team site template, ensures company customisations are applied when the site is created via the request portal, otherwise a standard siteEnsure=AbsentIsDefault=FalseSiteScriptNames=(Apply company customisations)TenantId=***Title=Apply company customisationsVerbose=TrueVersion=1WebTemplate=TeamSiteVERBOSE: [mycomputer]: [[SPOSiteDesign]SPOSiteDesign-Apply company customisations] Target Values: ApplicationId=***CertificateThumbprint=***Description=Default team site template, ensures company customisations are applied when the site is created via the request portal, otherwise a standard siteEnsure=PresentisDefault=FalseSiteScriptNames=(Apply company customisations)TenantId=***Title=Apply company customisationsVerbose=TrueVersion=1WebTemplate=TeamSiteVERBOSE: [mycomputer]: [[SPOSiteDesign]SPOSiteDesign-Apply company customisations] Test-TargetResource returned FalseVERBOSE: [mycomputer]: LCM: [ End Test ] [[SPOSiteDesign]SPOSiteDesign-Apply company customisations] in 0.4370 seconds.VERBOSE: [mycomputer]: LCM: [ Start Set ] [[SPOSiteDesign]SPOSiteDesign-Apply company customisations]VERBOSE: [mycomputer]: [[SPOSiteDesign]SPOSiteDesign-Apply company customisations] Setting configuration for SPO SiteDesign for Apply company customisationsVERBOSE: [mycomputer]: [[SPOSiteDesign]SPOSiteDesign-Apply company customisations] Getting configuration for SPO SiteDesign for Apply company customisationsVERBOSE: [mycomputer]: [[SPOSiteDesign]SPOSiteDesign-Apply company customisations] Getting Site Design for Apply company customisationsVERBOSE: [mycomputer]: [[SPOSiteDesign]SPOSiteDesign-Apply company customisations] No site designs with the identity provided through Identity have been foundVERBOSE: [mycomputer]: [[SPOSiteDesign]SPOSiteDesign-Apply company customisations] No Site Design found for Apply company customisationsVERBOSE: [mycomputer]: [[SPOSiteDesign]SPOSiteDesign-Apply company customisations] Adding new site design Apply company customisationsVERBOSE: [mycomputer]: LCM: [ End Set ] [[SPOSiteDesign]SPOSiteDesign-Apply company customisations] in 3.6670 seconds.VERBOSE: [mycomputer]: LCM: [ End Resource ] [[SPOSiteDesign]SPOSiteDesign-Apply company customisations]WARNING: Falling back to the previous MOF file or system defaults because the meta configuration mof does not exist or has either been corrupted or an invalid mof property has been set.VERBOSE: [mycomputer]: LCM: [ End Set ]VERBOSE: [mycomputer]: LCM: [ End Set ] in 46.2460 seconds.VERBOSE: Operation 'Invoke CimMethod' complete.VERBOSE: Time taken for configuration job to complete is 46.406 secondsRun 2VERBOSE: Perform operation 'Invoke CimMethod' with following parameters, ''methodName'= SendConfigurationApply,'className'= MSFT_DSCLocalConfigurationManager,'namespaceName'= root/Microsoft/Windows/DesiredStateConfiguration'.VERBOSE: An LCM method call arrived from computer mycomputer with user sid S-1-12-1-3691799957-1270395199-3808479900-2109869863.VERBOSE: [mycomputer]: LCM: [ Start Set ]VERBOSE: [mycomputer]: LCM: [ Start Resource ] [[SPOSiteScript]SPOSiteScript-Apply company customisations]VERBOSE: [mycomputer]: LCM: [ Start Test ] [[SPOSiteScript]SPOSiteScript-Apply company customisations]VERBOSE: [mycomputer]: [[SPOSiteScript]SPOSiteScript-Apply company customisations] Testing configuration for Site Script Apply company customisationsVERBOSE: [mycomputer]: [[SPOSiteScript]SPOSiteScript-Apply company customisations] Getting Site Script: Apply company customisationsWARNING: [mycomputer]: [[SPOSiteScript]SPOSiteScript-Apply company customisations] A newer version of PnP PowerShell is available: 2.12.0.Use 'Update-Module-Name PnP.PowerShell' to update.Use 'Get-PnPChangeLog-Release 2.12.0' to list changes.You can turn this check off by setting the 'PNPPOWERSHELL_UPDATECHECK' environment variable to 'Off'.VERBOSE: [mycomputer]: [[SPOSiteScript]SPOSiteScript-Apply company customisations] Getting the SPO Site Script: Apply company customisationsVERBOSE: [mycomputer]: [[SPOSiteScript]SPOSiteScript-Apply company customisations] Connecting to the SharePoint Online Admin Center at 'https://mysp-admin.sharepoint.com' to run this cmdletVERBOSE: [mycomputer]: [[SPOSiteScript]SPOSiteScript-Apply company customisations] Connected to the SharePoint Online Admin Center at 'https://mysp-admin.sharepoint.com' to run this cmdletVERBOSE: [mycomputer]: [[SPOSiteScript]SPOSiteScript-Apply company customisations] Current Values: ApplicationId=***CertificateThumbprint=***Content={ "": "schema.json", "actions": [ { "verb": "setRegionalSettings", "locale": 2057, "sortOrder": 25, "hourFormat": "24" }, { "verb": "triggerFlow", "url": "https://prod-21.uksouth.logic.azure.com:443/workflows/[GUID-REMOVED]/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=[key-removed]", "name": "Apply company customisations", "parameters": { "event": "Microsoft Event", "product": "SharePoint" } } ], "bindata": {}, "version": 1 }Ensure=AbsentIdentity=a6a9f6ee-02c8-47b4-9d03-901c1a79dd33TenantId=***Title=Apply company customisationsVerbose=TrueVERBOSE: [mycomputer]: [[SPOSiteScript]SPOSiteScript-Apply company customisations] Target Values: ApplicationId=***CertificateThumbprint=***Content={ "": "schema.json", "actions": [ { "verb": "setRegionalSettings", "locale": 2057, "sortOrder": 25, "hourFormat": "24" }, { "verb": "triggerFlow", "url": "https://prod-21.uksouth.logic.azure.com:443/workflows/[GUID-REMOVED]/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=[key-removed]", "name": "Apply company customisations", "parameters": { "event": "Microsoft Event", "product": "SharePoint" } } ], "bindata": {}, "version": 1 }Ensure=PresentIdentity=a6a9f6ee-02c8-47b4-9d03-901c1a79dd33TenantId=***Title=Apply company customisationsVerbose=TrueVERBOSE: [mycomputer]: [[SPOSiteScript]SPOSiteScript-Apply company customisations] Test-TargetResource returned FalseVERBOSE: [mycomputer]: LCM: [ End Test ] [[SPOSiteScript]SPOSiteScript-Apply company customisations] in 17.6200 seconds.VERBOSE: [mycomputer]: LCM: [ Start Set ] [[SPOSiteScript]SPOSiteScript-Apply company customisations]VERBOSE: [mycomputer]: [[SPOSiteScript]SPOSiteScript-Apply company customisations] Setting Site Script: Apply company customisationsVERBOSE: [mycomputer]: [[SPOSiteScript]SPOSiteScript-Apply company customisations] Getting Site Script: Apply company customisationsVERBOSE: [mycomputer]: [[SPOSiteScript]SPOSiteScript-Apply company customisations] Getting the SPO Site Script: Apply company customisationsVERBOSE: [mycomputer]: [[SPOSiteScript]SPOSiteScript-Apply company customisations] Site Script, {Apply company customisations}, doesn't exist. Creating it.
VERBOSE: [mycomputer]: [[SPOSiteScript]SPOSiteScript-Applycompanycustomisations] Waiting for another 3 seconds for Site Script to be ready.
VERBOSE: [mycomputer]: [[SPOSiteScript]SPOSiteScript-Applycompanycustomisations] Site Script, {Apply company customisations}, has been successfully created.
VERBOSE: [mycomputer]: [[SPOSiteScript]SPOSiteScript-Applycompanycustomisations] Site Script, {Apply company customisations} already exists, updating its settings
VERBOSE: [mycomputer]: LCM: [ EndSet ] [[SPOSiteScript]SPOSiteScript-Applycompanycustomisations] in12.7910 seconds.
VERBOSE: [mycomputer]: LCM: [ EndResource ] [[SPOSiteScript]SPOSiteScript-Applycompanycustomisations]
VERBOSE: [mycomputer]: LCM: [ StartResource ] [[SPOSiteDesign]SPOSiteDesign-Applycompanycustomisations]
VERBOSE: [mycomputer]: LCM: [ StartTest ] [[SPOSiteDesign]SPOSiteDesign-Applycompanycustomisations]
VERBOSE: [mycomputer]: [[SPOSiteDesign]SPOSiteDesign-Applycompanycustomisations] Testing configuration for SPO SiteDesign for Apply company customisations
VERBOSE: [mycomputer]: [[SPOSiteDesign]SPOSiteDesign-Applycompanycustomisations] Getting configuration for SPO SiteDesign for Apply company customisations
VERBOSE: [mycomputer]: [[SPOSiteDesign]SPOSiteDesign-Applycompanycustomisations] Getting Site Design for Apply company customisations
VERBOSE: [mycomputer]: [[SPOSiteDesign]SPOSiteDesign-Applycompanycustomisations] Current Values: AccessTokens=$null
ApplicationId=***
ApplicationSecret=$null
CertificatePassword=$null
CertificatePath=***
CertificateThumbprint=***
Credential=$null
Description=Default team site template, ensures company customisations are applied when the site is created via the request portal, otherwise a standard site
Ensure=Present
IsDefault=False
Managedidentity=False
PreviewImageAltText=$null
PreviewImageUrl=$null
SiteScriptNames=(Apply company customisations)
TenantId=***
Title=Apply company customisations
Version=1
WebTemplate=TeamSite
VERBOSE: [mycomputer]: [[SPOSiteDesign]SPOSiteDesign-Applycompanycustomisations] Target Values: ApplicationId=***
CertificateThumbprint=***
Description=Default team site template, ensures company customisations are applied when the site is created via the request portal, otherwise a standard site
Ensure=Present
isDefault=False
SiteScriptNames=(Apply company customisations)
TenantId=***
Title=Apply company customisations
Verbose=True
Version=1
WebTemplate=TeamSite
VERBOSE: [mycomputer]: [[SPOSiteDesign]SPOSiteDesign-Applycompanycustomisations] Test-TargetResource returned True
VERBOSE: [mycomputer]: LCM: [ EndTest ] [[SPOSiteDesign]SPOSiteDesign-Applycompanycustomisations] in1.6230 seconds.
VERBOSE: [mycomputer]: LCM: [ SkipSet ] [[SPOSiteDesign]SPOSiteDesign-Applycompanycustomisations]
VERBOSE: [mycomputer]: LCM: [ EndResource ] [[SPOSiteDesign]SPOSiteDesign-Applycompanycustomisations]
WARNING: Falling back to the previous MOF file or system defaults because the meta configuration mof does not exist or has either been corrupted or an invalid mof property has been set.
VERBOSE: [mycomputer]: LCM: [ EndSet ]
VERBOSE: [mycomputer]: LCM: [ EndSet ] in35.6810 seconds.
VERBOSE: Operation 'Invoke CimMethod' complete.
VERBOSE: Time taken for configuration job to complete is 35.824 seconds
Environment Information + PowerShell Version
OsName : Microsoft Windows 11 Enterprise
OsOperatingSystemSKU : EnterpriseEdition
OsArchitecture : 64-bit
WindowsVersion : 2009
WindowsBuildLabEx : 22621.1.amd64fre.ni_release.220506-1250
OsLanguage : en-US
OsMuiLanguages : {en-US, en-GB}
Key : PSVersion
Value : 5.1.22621.4391
Name : PSVersion
Key : PSEdition
Value : Desktop
Name : PSEdition
Key : PSCompatibleVersions
Value : {1.0,2.0,3.0,4.0...}
Name : PSCompatibleVersions
Key : BuildVersion
Value : 10.0.22621.4391
Name : BuildVersion
Key : CLRVersion
Value : 4.0.30319.42000
Name : CLRVersion
Key : WSManStackVersion
Value : 3.0
Name : WSManStackVersion
Key : PSRemotingProtocolVersion
Value : 2.3
Name : PSRemotingProtocolVersion
Key : SerializationVersion
Value : 1.1.0.1
Name : SerializationVersion
The text was updated successfully, but these errors were encountered:
@pmatthews05 PR open to fix it. The issue is because there is an Identity property specified that most likely refers to a non-existing one. This will be fixed, just checked it on my machine.
Description of the issue
Using M365DSC to deploy A SPO Site Design and Site Script.
When deployed once, it seems to look OK.
Although note that the Id of the SiteScript
ff26c796-b4dd-4748-86ff-dad011e5eb4f
doesn't match the Identity in the M365TenantConfig.ps1a6a9f6ee-02c8-47b4-9d03-901c1a79dd33
When you deploy the second time, you can see that the the Site Script is deployed again with a different ID.
Microsoft 365 DSC Version
v1.25.122.2
Which workloads are affected
SharePoint Online
The DSC configuration
Verbose logs showing the problem
Environment Information + PowerShell Version
The text was updated successfully, but these errors were encountered: