As we are transitioning away from PNP Online Module - SECTION will capture all corresponding research.
Working with SharePoint sites in Microsoft Graph
https://learn.microsoft.com/en-us/graph/api/resources/sharepoint?view=graph-rest-1.0
API supports core activities:
- Access to SharePoint sites, lists, and drives (document libraries)
- Read-only support for site resources (no ability to create new sites)
- Read-write support for lists, listItems, and driveItems
- Read-write support for tenant-level SharePointSettings
- Address resources by SharePoint ID, URL, or relative path
The SharePoint API exposes three major resource types:
- Site (top-level object)
- List
- ListItem
# Install the Microsoft Graph PowerShell SDK Install-Module Microsoft.Graph # Connect to Microsoft Graph Connect-MgGraph -Scopes "Sites.ReadWrite.All" # Create a new SharePoint site $site = New-MgSite -DisplayName "New Site" -WebUrl "https://yourtenant.sharepoint.com/sites/newsite" -SiteCollection @{Hostname="yourtenant.sharepoint.com"; SiteCollectionType="TeamSite"}