pnpframework icon indicating copy to clipboard operation
pnpframework copied to clipboard

Get-PnPSiteTemplate: GetAccessTokenAsync() called without an ACS token generator

Open MSFT-klpinhac opened this issue 2 years ago • 6 comments

I'm using PowerShell 7.3.8 with PnP.PowerShell-Module 2.2.0 and i'm facing the error below when i try to get a provisioning-template that includes Lists ( i have tried multiple lists, including custom lists and Event-lists, but the error is always the same ). Using Set-PnPTraceLog did not help, as the file created is empty.

PS C:\Temp> Get-PnPSiteTemplate -Out c:\temp\template.xml -ListsToExtract "15d8a18d-b27b-4a80-9555-3e521b8216c3" -handlers Lists

Get-PnPSiteTemplate: GetAccessTokenAsync() called without an ACS token generator. Specify in AuthenticationManager constructor the authentication parameters

MSFT-klpinhac avatar Oct 20 '23 10:10 MSFT-klpinhac

Same problem. I found this:https://techcommunity.microsoft.com/t5/sharepoint-developer/get-pnpsitetemplate-attempted-to-perform-an-unauthorized/m-p/2631095 It seems that this problem is caused by the way we use to connect-pnponline. But my company is using SharePoint Online operated by 21v in China, I can only connect-pnponline with -useweblogin. How to fix it?

Haiqi-Wu avatar Nov 08 '23 09:11 Haiqi-Wu

Same issue here as reported by parent with 2.2.0, but using european tenant with -UseWebLogin (-Interactive does not work as it results in 401 unauthorized).

CodingSinceThe80s avatar Dec 20 '23 12:12 CodingSinceThe80s