Skip to content

[FEATURE] Suppress Connect-PnPOnline warning for token cache #5082

@LutzD-pkb

Description

@LutzD-pkb

Is your feature request related to a problem? Please describe.
When connecting using Connect-PnPOnline -PersistLogin, a warning prompt appears that you are using the token cache. It's rather annoying - I purposefuly provided the PersistLogin flag and do not need to be warned - and distracts from real warnings or errors.

Often times I'm working with bulk operations running against thousands of sites, so may see this warning thousands of times flooding the console or logs if I'm redirecting warnings for large operations.

Describe the solution you'd like
Provide a flag, either via an environmental variable or as an additional switch (e.g. SkipTokenCacheWarning) on Connect-PnPOnline itself, to suppress these warnings.

Describe alternatives you've considered
Using -WarningAction would be a band-aid, as it may suppress other (real) warnings. However, this is not possible due (see #5078).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions