microsoftgraph / microsoftgraph/msgraph-sdk-powershell

Improve UX by Forcing Calling Window to Foreground After Authentication

Open
#3,277 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

type:feature
Dominant language
C#
Stars
898
Forks
230
Avg merge
2d 5h
Merged PRs (30d)
31

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the authentication flow that launches the default browser and returns to the calling PowerShell process; review SetForegroundWindow's documented conditions for powershell.exe, pwsh.exe, and windowsterminal.exe. Done means the calling window is brought to the foreground after authentication for all three hosts while preserving the existing browser-based flow.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
cli, operating-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.