Modern (Site) Pages
⚠️ Classic page types are legacy. SharePoint has two page families:
| Classic pages (legacy) |
Modern pages (current) |
| Wiki pages, web part pages, blog pages, publishing pages |
Site Pages |
| Classic UI, no mobile responsive |
Canvas layout with responsive web parts |
| Created in Site Pages library with classic experience |
Created in Site Pages library with modern experience |
| Not supported on modern team/communication sites |
Default on modern sites |
Use modern Site Pages for new work. For building custom page components,
use SPFx client-side web parts.
Create, read, update, publish, and manage modern SharePoint pages.
Modern pages use a canvas layout with web parts and can be promoted to news posts.
Prerequisites
| Requirement |
Description |
Reference |
| Site Owner or Member role |
Required to create, update, and delete pages. Read access for browsing. |
SharePoint admin roles |
Examples
Quick start
from office365.sharepoint.client_context import ClientContext
ctx = ClientContext("https://contoso.sharepoint.com/sites/team").with_client_certificate(
"contoso.onmicrosoft.com", client_id="client_id", thumbprint="thumbprint", cert_path="./cert.pem"
)
# List all site pages
pages = ctx.web.site_pages.pages.get().execute_query()
for page in pages:
print(f" {page.file_name} : {page.title}")
API reference
More examples