Site Script Action Limit

%3CLINGO-SUB%20id%3D%22lingo-sub-656315%22%20slang%3D%22en-US%22%3ESite%20Script%20Action%20Limit%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-656315%22%20slang%3D%22en-US%22%3E%3CP%3EMicrosoft's%20documentation%20states%3A%3C%2FP%3E%3CP%3E%3CEM%3EWe'd%20previously%20capped%20the%20limit%20of%20site%20script%20actions%20to%2030.%20This%20remains%20the%20limit%20for%20scripts%20applied%20synchronously%20using%20the%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fmodule%2Fsharepoint-online%2FInvoke-SPOSiteDesign%3Fview%3Dsharepoint-ps%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EInvoke-SPOSiteDesign%3C%2FA%3E%26nbsp%3Bcommand%2C%20but%20based%20on%20customer%20feedback%20and%20support%20for%20additional%20actions%20we%20have%20bumped%20this%20limit%20to%20300%20actions%20(or%20100%2C000%20characters)%20when%20the%20scripts%20are%20applied%20asynchronously%20(either%20through%20the%20UI%20or%20using%20the%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fmodule%2Fsharepoint-online%2FAdd-SPOSiteDesignTask%3Fview%3Dsharepoint-ps%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EAdd-SPOSiteDesignTask%3C%2FA%3E%26nbsp%3Bcommand).%3C%2FEM%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20created%20a%20script%20that%20has%20more%20than%2030%20actions%2C%20and%20indeed%20the%20Invoke-SPOSiteDesign%20command%20does%20not%20work%3B%20however%2C%20the%20Add-SPOSiteDesignTask%20does%20work.%26nbsp%3B%20I%20assume%20that%20...%22through%20the%20UI%22%20in%20the%20statement%20above%20refers%20to%20creating%20a%20site%20using%20the%20Create%20Site%20button%20in%20SharePoint.%26nbsp%3B%20When%20I%20use%20the%20Create%20Site%20button%20with%20my%20design%20that%20contains%20the%20%2B30%20action%20script.%26nbsp%3B%20It%20does%20not%20work.%26nbsp%3B%20I%20just%20get%20the%20message%20that%20it%20is%20Initializing%2C%20but%20nothing%20ever%20happens.%26nbsp%3B%20If%20I%20cancel%20out%20of%20the%20operation%20and%20then%20use%20the%20PowerShell%20Add-SPOSiteDesignTask%20command%2C%20the%20design%20is%20applied%20as%20expected.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhat%20does%20Microsoft%20mean%20by%20%22...through%20the%20UI%22%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-656315%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESite%20Designs%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESite%20Scripts%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-686629%22%20slang%3D%22en-US%22%3ERe%3A%20Site%20Script%20Action%20Limit%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-686629%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F330577%22%20target%3D%22_blank%22%3E%40Gary_Stewart%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F79426%22%20target%3D%22_blank%22%3E%40Laura%20Kokkarinen%3C%2FA%3E%26nbsp%3Btalks%20about%20this%20in%20her%20blog%20post%20on%20Site%20Designs%20and%20Site%20Scripts.%20Are%20you%20on%20a%20first%20release%20tenant%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Flaurakokkarinen.com%2Fthe-ultimate-guide-to-sharepoint-site-designs-and-site-scripts%2F%23large-site-designs%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Flaurakokkarinen.com%2Fthe-ultimate-guide-to-sharepoint-site-designs-and-site-scripts%2F%23large-site-designs%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1458178%22%20slang%3D%22en-US%22%3ERe%3A%20Site%20Script%20Action%20Limit%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1458178%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F241707%22%20target%3D%22_blank%22%3E%40Thomas%20Berman%3C%2FA%3E%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F79426%22%20target%3D%22_blank%22%20rel%3D%22noopener%22%3E%40Laura%20Kokkarinen%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F330577%22%20target%3D%22_blank%22%20rel%3D%22noopener%22%3E%40Gary_Stewart%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20have%20large%20site%20with%20more%20than%2030%20list%20and%20library.%20So%20we%20have%20split%20into%204%20site%20scripts%20due%20to%20limit%20of%20100000%20characters.%20After%20we%20have%20added%204%20site%20scripts%20into%20site%20using%20below%20code%3C%2FP%3E%3CP%3EAdd-SPOSiteDesign%20%60%3CBR%20%2F%3E-Title%20%22My%20customer%20tracking%22%20%60%3CBR%20%2F%3E-WebTemplate%20%2264%22%20%60%3CBR%20%2F%3E-SiteScripts%20%3CSTRONG%3Escript1.id%2Cscript2.id%2Cscript3.id%2Cscript4.id%3C%2FSTRONG%3E%20%60%3CBR%20%2F%3E-Description%20%22Tracks%20key%20customer%20data%20in%20a%20list%22%20%60%3CBR%20%2F%3E-PreviewImageUrl%20%22%3CA%20href%3D%22https%3A%2F%2Fcontoso.sharepoint.com%2FSiteAssets%2Fsite-preview.png%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fcontoso.sharepoint.com%2FSiteAssets%2Fsite-preview.png%3C%2FA%3E%22%20%60%3CBR%20%2F%3E-PreviewImageAltText%20%22site%20preview%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAfter%20when%20we%20try%20to%20apply%26nbsp%3B%3CSTRONG%3EAdd-SPOSiteDesignTask%3C%2FSTRONG%3E%20throwing%20below%20error%26nbsp%3B%3C%2FP%3E%3CDIV%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%3CP%3E%22Operation%20is%20not%20valid%20due%20to%20the%20current%20state%20of%20the%20object%22%26nbsp%3B%20any%20idea%3F%20how%20to%20resolve%20or%20root%20cause%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

Microsoft's documentation states:

We'd previously capped the limit of site script actions to 30. This remains the limit for scripts applied synchronously using the Invoke-SPOSiteDesign command, but based on customer feedback and support for additional actions we have bumped this limit to 300 actions (or 100,000 characters) when the scripts are applied asynchronously (either through the UI or using the Add-SPOSiteDesignTask command).

 

I created a script that has more than 30 actions, and indeed the Invoke-SPOSiteDesign command does not work; however, the Add-SPOSiteDesignTask does work.  I assume that ..."through the UI" in the statement above refers to creating a site using the Create Site button in SharePoint.  When I use the Create Site button with my design that contains the +30 action script.  It does not work.  I just get the message that it is Initializing, but nothing ever happens.  If I cancel out of the operation and then use the PowerShell Add-SPOSiteDesignTask command, the design is applied as expected.

 

What does Microsoft mean by "...through the UI"?

2 Replies
Highlighted

@Gary_Stewart 

 

@Laura Kokkarinen talks about this in her blog post on Site Designs and Site Scripts. Are you on a first release tenant?

 

https://laurakokkarinen.com/the-ultimate-guide-to-sharepoint-site-designs-and-site-scripts/#large-si...

Highlighted

@Thomas Berman @Laura Kokkarinen @Gary_Stewart 

 

We have large site with more than 30 list and library. So we have split into 4 site scripts due to limit of 100000 characters. After we have added 4 site scripts into site using below code

Add-SPOSiteDesign `
-Title "My customer tracking" `
-WebTemplate "64" `
-SiteScripts script1.id,script2.id,script3.id,script4.id `
-Description "Tracks key customer data in a list" `
-PreviewImageUrl "https://contoso.sharepoint.com/SiteAssets/site-preview.png" `
-PreviewImageAltText "site preview"

 

After when we try to apply Add-SPOSiteDesignTask throwing below error 

 

"Operation is not valid due to the current state of the object"  any idea? how to resolve or root cause

 

Thanks