I'm using the command `Connect-MgGraph -ClientId "MyClientID" -TenantId "MyTenantID" -Scopes "UserAuthenticationMethod.ReadWrite.All" -NoWelcome` to connect to Microsoft Graph. Initially, it prompts me to enter my email and password, but now it logs me in automatically every time I run it. I want to be prompted for my credentials every time I connect. I know that running `Disconnect-MgGraph` can prompt me for my username if there's an active session, but if I close and open a new shell, it connects without asking for authentication. How can I ensure I'm prompted for my sign-in info each time?
2 Answers
Instead of using the options, you could just run `Connect-MgGraph` alone. But keep in mind, since you're using both ClientId and TenantId, this suggests that you're connecting to a tenant that's different from your logged-in user. So, this might not be the best route.
Try using `Connect-MgGraph -ContextScope Process`. This will bypass the Windows Authentication Manager (WAM), which is likely caching your credentials. It's really helpful if you need to switch between multiple clients or sessions. You can even set this as your default using PSDefaultParameters.

Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures