Connect-PnPOnline with ClientId and ClientSecret throwing error: The remote server returned an error: (401) #4856
Unanswered
prakashkumarsingh514
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I created App Id and granted Sites.FullControl.All under Application.
But while running below command using ClientSecret:
Connect-PnPOnline -Url $siteurl -ClientId $clientID -ClientSecret $secrt
It gives error : Get-PnPSite: The remote server returned an error: (401) .
But while running using Certificate Thumbprint:
Connect-PnPOnline -Url $siteurl -ClientId $clientID -Tenant $tenant -Thumbprint $certThumbPrint
Its working fine and Get-PnPSite showing correct result.
I Installed latest PnP.PowerShell version 2.12.0
But still ClientSecret command throwing error.
Please suggest.
Beta Was this translation helpful? Give feedback.
All reactions