Skip to content

Bring back -ForceRefresh for Connect-MgGraph #2837

@nkasco

Description

@nkasco

Is your feature request related to a problem? Please describe the problem.

I've identified scenarios with 2.x versions of the module that lead to unexpected auto-authentication with Connect-MgGraph in scripts. This is not expected behavior as I should be presented with an account picker since 2 accounts are logged in.

Describe the solution you'd like.

While it seems like running Disconnect-MgGraph before a script exists helps avoid this, if you run that cmdlet during a new PS session it does not know what to do. Therefore, rather than having to add that cmdlet with odd error handling or force clearing the token cache, I'd like to see -ForceRefresh be brought back so that it ensures the account picker is always visible.

Additional context?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions