AzureAD / microsoft-authentication-library-for-dotnet

Microsoft Authentication Library (MSAL) for .NET
https://aka.ms/msal-net
MIT License
1.39k stars 340 forks source link

[Bug] Parent window handle detection code for console apps no longer works with Windows Terminal v1.22+ #4928

Open GruberMarkus opened 1 month ago

GruberMarkus commented 1 month ago

Library version used

not relevant for this issue

.NET version

not relevant for this issue

Scenario

PublicClient - desktop app

Is this a new or an existing app?

This is a new app or experiment

Issue description and reproduction steps

The code from https://learn.microsoft.com/en-us/entra/msal/dotnet/acquiring-tokens/desktop-mobile/wam#parent-window-handles no longer works correctly with Windows Termin v1.22+, as the handle points to a hidden pseudo console.

Relevant code snippets

No response

Expected behavior

Please update the sample code so that also works with Windows Termin v1.22+ and hidden pseudo consoles.

Identity provider

Microsoft Entra ID (Work and School accounts and Personal Microsoft accounts)

Regression

No response

Solution and workarounds

No response

GruberMarkus commented 3 weeks ago

Windows Termin 1.22.2702.0 has been released, with the handle pointing to a hidden pseudo console.

Does someone already have an idea how to get the correct parent window handle now?