This directory contains examples for the SharePoint REST API v1
(office365.sharepoint). Each example uses a minimal auth setup and
prints clear output.
| Directory | Covers |
|---|---|
app-catalog/ |
SPFx app lifecycle |
alerts/ |
Email notifications on list/item changes |
audit/ |
Audit settings, sign-in logs |
auth/ |
Modern MSAL auth, legacy ACS/SAML, on-prem NTLM, cookie capture |
contenttypes/ |
Content types, field links, hierarchy |
customactions/ |
Custom action bindings (legacy) |
eventreceivers/ |
Remote event receivers (legacy) |
features/ |
Site features activation |
fields/ |
Site/list column CRUD (all types) |
files/ |
Upload, download, copy, move, check out, versions, permissions |
folders/ |
Create, copy, move, rename, delete folders |
groups/ |
SharePoint groups management |
hubsites/ |
Hub site registration, association |
listitems/ |
Item CRUD, bulk operations, filters, attachments |
lists/ |
List CRUD, import/export, paging |
migration/ |
Migration assessment scanner |
navigation/ |
Top nav, Quick Launch |
operations/ |
Long-running async operations (create/update/delete sites), SpoOperation polling |
pages/ |
Modern site pages CRUD, news |
propertybag/ |
Custom key-value pairs on webs |
permissions/ |
Grant, revoke, break inheritance |
recyclebin/ |
Restore deleted items |
compliance/ |
Retention labels, compliance tags on sites/lists/files |
search/ |
KQL queries, filters, refinement, crawl diagnostics, admin |
sharing/ |
Sharing links, anonymous access |
sitedesigns/ |
Site designs and site scripts |
sites/ |
Create (modern/classic/communication), manage admins |
sitescripts/ |
Site script JSON actions |
taxonomy/ |
Term store, term sets, managed metadata |
teams/ |
Teams via SharePoint API (limited) |
tenant/ |
Tenant admin, site collections, licensing, quotas, version policy |
userprofile/ |
Profile properties, followers, OneDrive URL |
users/ |
Current user, site users, search |
views/ |
List views, default and custom |
webhooks/ |
List/webhook subscriptions |
advanced/ |
Proxy config, SSL, performance diagnostics, raw requests |
webs/ |
Web properties, subsites, changes, regional settings |
from office365.sharepoint.client_context import ClientContext
ctx = ClientContext("https://contoso.sharepoint.com/sites/team").with_client_secret(
"contoso.onmicrosoft.com", "client_id", "client_secret"
)
web = ctx.web.get().execute_query()
print(f"Connected to: {web.title} ({web.url})")