msgraph-sdk-powershell icon indicating copy to clipboard operation
msgraph-sdk-powershell copied to clipboard

Improve UX by Forcing Calling Window to Foreground After Authentication

Open nkasco opened this issue 7 months ago • 0 comments

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

The current authentication flow kicks you out to your default browser, which is desirable because it allows you to use passkeys and alternate accounts easily. However, after auth the calling script window often gets lost behind a mess of other windows.

Describe the solution you'd like.

Properly leverage SetForegroundWindow and meet the proper conditions to automatically bring the calling powershell window to the front.

This improved UX allows the user to stay in flow state without confusion.

This should work with powershell.exe, pwsh.exe, and windowsterminal.exe

Additional context?

No response

nkasco avatar Apr 16 '25 14:04 nkasco