Reporting an Issue or Missing Feature
After creating a persisted login token, subsequent calls to Connect-PnPOnline
(e.g. to connect to a different context) print a warning:
WARNING: Connecting using token cache. See https://pnp.github.io/powershell/articles/persistedlogin.html for more information.
As it's a warning I thought setting the WarningAction
or WarningPreference
to SilentlyContinue
would suppress this message.
Expected behavior
Expected to see no WARNING after I've set WarningAction
or WarningPreference
to SilentlyContinue
.
Actual behavior
I keep seeing the warning, regardless of my preferred warning action:
Steps to reproduce behavior
Please include complete script or code samples in-line or linked from gists
$WarningPreference='SilentlyContinue'
Connect-PnPOnline -Url https://<tenant>.sharepoint.com -PersistLogin
$url="https://<tenant>.sharepoint.com/teams/<identifier>"
Connect-PnPOnline -Url $url
What is the version of the Cmdlet module you are running?
3.1.0
Which operating system/environment are you running PnP PowerShell on?