Architecture, Automation, and Development

What Is SharePoint Site Script? SharePoint Definition and Guide

A SharePoint Site Script is a JSON definition containing an ordered list of supported actions that configure a modern SharePoint site. One or more registered scripts are associated with a SharePoint Site Template and can create or configure lists, fields, content types, themes, navigation, sharing, regional settings, roles, Power Automate triggers, and deployed solutions.

Business LeaderIT DirectorSharePoint AdminAlso: site design scriptAlso: SharePoint provisioning JSONAlso: site-script actions
Current as of July 13, 2026: As of July 13, 2026, Microsoft documents up to 300 actions or 100,000 characters for asynchronously applied scripts, while synchronous Invoke-SPOSiteDesign remains limited to 30 actions.

What SharePoint Site Script Means in SharePoint

Each action uses a Microsoft-defined verb and parameters from the SharePoint site-script JSON schema. Scripts are registered in the tenant and return an ID, which a site template references. Actions normally run in order and are designed to be non-destructive, so reapplication adds or updates supported configuration rather than recreating the entire site from scratch.

A site script is not arbitrary JavaScript and does not run unrestricted client code. It is declarative JSON limited to supported verbs. When a provisioning requirement exceeds those verbs, a script can trigger a Power Automate flow or install an approved solution, but the resulting architecture needs separate security, error handling, and monitoring.

Why It Matters to the Business

For the business, site scripts turn governance standards into repeatable defaults. They can reduce manual setup and avoid missing columns, navigation, branding, or sharing settings. The benefit is consistency and speed, provided the automated configuration reflects an approved site pattern.

Business owners should review what each script changes and which decisions remain manual. Hard-coding a department name, owner, or sensitive permission into reusable JSON creates risk. Variable and high-impact values may belong in a controlled request and provisioning workflow.

What SharePoint Administrators Need to Know

Developers should validate JSON against Microsoft's schema, keep scripts in source control, and register them through supported PowerShell or REST APIs. Test synchronous and asynchronous application, action and size limits, multiple-script order, reruns, failures, and channel-site restrictions. Use stable IDs and documented releases.

Logging and support are essential because some actions run asynchronously. Capture provisioning requests and results, surface failures to an owner, and avoid assuming that site creation means every action completed. Review script rights, template scope, flow endpoints, solution packages, and any external services invoked.

What to Consider

Stay declarative

Use supported JSON verbs for predictable configuration and move complex logic to a separately governed service only when necessary.

Design for reruns

Test the script against new, partially configured, and previously provisioned sites so repeated application remains safe.

Observe asynchronous work

Record execution results and failures, especially when actions or triggered flows continue after the site itself appears ready.

Practical Takeaway

Treat Site Scripts as production code: source-control the JSON, validate the schema, test reruns and limits, monitor execution, and document every supported action.

How This Shows Up in the Field

Metadata foundation

A script creates site columns, content types, and libraries, then applies navigation and a theme before the business owner adds content.

Extended provisioning

A native action triggers a secured Power Automate flow that records the site in a catalog and requests owner confirmation, with failures logged for support.

Site Script and Site Template

SharePoint Site ScriptThe registered JSON action definition that performs supported configuration on a site.
SharePoint Site TemplateThe user-facing template object that references one or more scripts and controls where the pattern is offered.
SPFx solutionA packaged client-side customization that can be installed by a site script but has its own code, permissions, testing, and lifecycle.

Related SharePoint Glossary Terms

Frequently Asked Questions

Is a SharePoint Site Script JavaScript?

No. It is declarative JSON that uses Microsoft-supported action verbs and parameters. It cannot execute arbitrary browser code.

Can a Site Script be run more than once?

Yes, Microsoft describes site scripts as non-destructive and rerunnable, but exact action behavior varies. Test reapplication on new and partially configured sites before production.

What if native site-script actions are not enough?

A script can trigger a Power Automate flow or install an approved solution, and a separate provisioning service can use APIs or PnP. Govern the added authentication, permissions, logging, errors, and support.

Official Microsoft References

Editorial review date: July 13, 2026. Product status and licensing can change; confirm current Microsoft documentation before implementation.

Put SharePoint Site Script to work with a clear plan

6SC can help your organization evaluate, design, implement, govern, and support SharePoint Site Script in a maintainable Microsoft 365 environment.

Talk with 6SC
Scroll to Top