Posts

New-PnPTenantSite: The remote server returned an error: (401) Unauthorized.

New-PnPTenantSite: The remote server returned an error: (401) Unauthorized. Recently I was working on automate SharePoint site provisioning PnP script. We wanted to schedule this script to auto trigger on hourly basis, so we scheduled the script. As the script was to be scheduled one, we started creating SharePoint Apps to manage authentication. Register SharePoint Add-ins Go to <site collection url>/_layouts/15/AppRegNew.aspx by using a web browser. AppRegNew page form Enter values for the follow form fields: Add-in ID . Also known as client ID; a GUID that can be generated (when you select Generate ) or pasted into AppRegNew.aspx. The value must be unique for each add-in and must be lowercase .   Add-in Secret . Also known as the client secret, an opaque string. It is generated on the AppRegNew.aspx page by using the Generate button. Title:  A user-friendly title: for example, Contoso photo print
Recent posts