sp-starter-kit: Exception while invoking endpoint
Category
- Bug
Describe the bug
When provisioning my sharepoint starter kit v2 on my demo tenant [Sharepoint Online] I received the error Apply-PnPTenantTemplate : Exception while invoking endpoint https://login.microsoftonline.com/ca67dfff-ffff-ffff-ffff-fffffffffdfb/oauth2/token’
I put some ‘f’ in the hexadecimal code, because i don`t know if it is confidential
Expected or Desired Behavior
Expected deploy sharepoint pnp to my environment just like a comunity demo
Observed Behavior
Steps to Reproduce
After instaled the correct version version of PnP Powerhsell Module, and in the pnp provisioning folder
1 - Connect-PnPOnline https://****.sharepoint.com/
2 - Apply-PnPTenantTemplate -Path .\starterkit.pnp -Parameters @{“PORTALURL”=“/sites/demov2portal03”; “MARKETINGALIAS”=“demoV2marketing03”; “HRALIAS”=“demov2hr03”}
Environment Details (Development & Target environment)
- Starter kit version: v2
- OS: Windows 10
- Target Environment: SharePoint Online
- Framework: Node.js v12
- Browser(s): Chrome v83
- Additional details: The user is a Global Admin of the the tenant, is the account that I create this demo tenant
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 16 (1 by maintainers)
Have identified that you first need to run the following in PowerShell to get a token.
Connect-PnPOnline -Url https://tenant-admin.sharepoint.com/ -PnPO365ManagementShell
Follow onscreen directions to obtain a token. Note the timeout is reasonably short so have any required credentials at hand.
Then needed to reconnect on the root tenancy URL or you will get an object ref not set error
Connect-PnPOnline -Url https://tenant.sharepoint.com Then Apply-PnPTenantTemplate -Path “.\starterkit.pnp” -Parameters @{“PORTALURL”=“/sites/StarterKit-Portal”; “MARKETINGALIAS”=“StarterKit-Marketing”; “HRALIAS”=“StarterKit-PeopleCulture” }
After that it was all good.
I was able to install everything successfully following suggested steps Install-Module -Name “SharePointPnPPowerShellOnline” -RequiredVersion 3.20.2004.0 Connect-PnPOnline -Url https://tenant-admin.sharepoint.com/ -PnPO365ManagementShell Connect-PnPOnline -Url https://tenant.sharepoint.com Change to the provisioning folder found in this solution’s root and execute the following command (using your own tenant url and the prefix of your choosing):
Apply-PnPTenantTemplate -Path .\starterkit.pnp
@eoverfield thanks for sharing that workaround. I was running into the same invoking endpoint exception on a Developer program tenant. Reverting back to the April 2020 release of PnP PowerShell worked in my case.
We have been seeing problems installing the kit with the latest versions of PnP PS versions, i.e. 3.22.2006.2. I suggest removing all versions of SharePointPnPPowerShellOnline on your workstation, then installing April 2020 release as a test (3.20.2004.0) i.e.
Install-Module -Name “SharePointPnPPowerShellOnline” -RequiredVersion 3.20.2004.0