79807278

Date: 2025-11-02 17:46:14
Score: 3.5
Natty:
Report link

Creating a Modern Team Site using the SP API via App Only Tokens does not work. In order to create a Modern Team Site you must use Microsoft Graph API to do this. So use our Graph module instead of the SP Module.

You can see the Microsoft docs here.

https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/security-apponly#what-are-the-limitations-when-using-app-only

In case this link goes bad, it says: "Creating modern team sites does not support app-only when you use the SharePoint API for it."

We've noted this in our docs as well.

enter image description here

https://pnp.github.io/pnpjs/sp/sites/#create-a-modern-team-site

Reasons:
  • Blacklisted phrase (1): this link
  • Probably link only (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Beau Cameron