You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.
Whenever the following is run in a new PowerShell window, it results in two login windows being show with the following error being returned after the first has login window has been submitted
Get-PnPSite : The remote server returned an error: (403) Forbidden.
The issue appears to be due to Connect-PnPOnline not waiting until the credentials have been entered and instead continues on to the Get-PnPSite command.
If we rerun the same commands in the same PowerShell window only one login window is shown and the Get-PnPSite command returns the expected result.
We have tested this across multiple machines with multiple version of PnPPowerShellOnline and the behaviour is the same
We have also tried manually removing the tokencache.dat file. This still results in the same behavior as above:
-SPOManagementShell: We are using this as legacy authentication has been turned off on our tenants
-ClearTokenCache: We are using this as we swap between multiple tenants for testing and we found that without this were getting 401 errors as the cached credentials were for other tenants we were previously connected too.
Expected behavior
Returns the PnPSite Object.
Actual behavior
Get-PnPSite : The remote server returned an error: (403) Forbidden.
Exact;y the same issue here, worked well before. The command Connect-PnPOnline is not waiting until the credentials have been entered and instead continues on to the next command.
Rerun the command results in the expected behaviour, then it will wait untill the next command.
We are using -SPOManagementShell cause MFA is enabled and we need to iterate (and connect) all group#0 sites.
Issue
Whenever the following is run in a new PowerShell window, it results in two login windows being show with the following error being returned after the first has login window has been submitted
The issue appears to be due to Connect-PnPOnline not waiting until the credentials have been entered and instead continues on to the Get-PnPSite command.
If we rerun the same commands in the same PowerShell window only one login window is shown and the Get-PnPSite command returns the expected result.
We have tested this across multiple machines with multiple version of PnPPowerShellOnline and the behaviour is the same
We have also tried manually removing the tokencache.dat file. This still results in the same behavior as above:
-SPOManagementShell: We are using this as legacy authentication has been turned off on our tenants
-ClearTokenCache: We are using this as we swap between multiple tenants for testing and we found that without this were getting 401 errors as the cached credentials were for other tenants we were previously connected too.
Expected behavior
Returns the PnPSite Object.
Actual behavior
Steps to reproduce behavior
Run the following:
Which version of the PnP-PowerShell Cmdlets are you using?
What is the version of the Cmdlet module you are running?
SharePointPnPPowerShellOnline - 3.17.2001.2
How did you install the PnP-PowerShell Cmdlets?
The text was updated successfully, but these errors were encountered: