SharePoint PnP logo

New-PnPSite fails with “SiteStatus” : 3

Reading Time: 3 minutes. This post was most recently updated on December 4th, 2018.While running “New-PnPSite” or actually any other site creation, method in PowerShell or programmatically, the site creation fails and you get an error like the one below back: New-PnPSite : {"d":{"Create":{"__metadata":{"type":"SP.Publishing.CommunicationSiteCreationResponse"},"SiteStatus":3,"SiteUrl":""}}} Ouch! Where does this come from? In the code of New-PnPSite, the actual function call is shown below: var results = ClientContext.CreateSiteAsync(creationInformation); var returnedContext = results.GetAwaiter().GetResult(); (Source) So, the error is not thrown by PnP cmdlet, but rather comes from SharePoint CSOM. This is pretty normal and not surprising, but means we can’t debug it that much, as CSOM is […]

Get-MsolServicePrincipalCredential - how to get the expiration date for a clientId

Fastest way to verify your Client Id and Client Secret are valid with PowerShell

Reading Time: 3 minutes. This post was most recently updated on August 13th, 2018.So, you have a Client Id and a Client Secret, but don’t know if they work anymore? Maybe they are expired? Maybe someone removed them? No worries! We can use PowerShell to validate them easily! Solution By using PowerShell, it’s fairly straightforward to verify, that your Client Id and Client Secret work. See the snippets below for 2 different steps: First we validate, that the values work. If they don’t, let’s run another script to see if the Client Id exists but has expired. Validate your Client Id by trying to […]

SharePoint's broken as usual

How to enable custom scripts for a SharePoint site collection?

Reading Time: 6 minutes. This post was most recently updated on December 4th, 2018.This article explains how to enable custom scripts for any SharePoint site collection. Different instructions and solutions apply to SharePoint Online, and on-premises scenarios (SharePoint 2013, 2016 and probably 2019). Different solutions resolve the issue for different target sites: Modern SharePoint Team Sites (attached to Office Groups) SharePoint MySites Personal OneDrive sites Any SharePoint site collection created based on self-service site creation SharePoint Online tenant root site collection Any Classic SharePoint site collection Errors and causes Most typically I run into this when trying to insert a script web part with […]