Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bring back -ForceRefresh for Connect-MgGraph #2837

Closed
nkasco opened this issue Jul 8, 2024 · 2 comments
Closed

Bring back -ForceRefresh for Connect-MgGraph #2837

nkasco opened this issue Jul 8, 2024 · 2 comments
Labels
no-recent-activity status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close type:feature New experience request

Comments

@nkasco
Copy link

nkasco commented Jul 8, 2024

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

@nkasco nkasco added status:waiting-for-triage An issue that is yet to be reviewed or assigned type:feature New experience request labels Jul 8, 2024
@timayabi2020
Copy link
Contributor

@nkasco it seems you are trying to connect to Microsoft Graph using two alternate credentials. If that's the case, then you can make use of Connect-MgGraph -ContextScope Process

@timayabi2020 timayabi2020 added status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close and removed status:waiting-for-triage An issue that is yet to be reviewed or assigned labels Jul 25, 2024
Copy link
Contributor

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-recent-activity status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close type:feature New experience request
Projects
None yet
Development

No branches or pull requests

2 participants