Skip to content

[Bug] Can't set window title if using WAM #5266

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

Open
Prochy opened this issue May 9, 2025 · 1 comment
Open

[Bug] Can't set window title if using WAM #5266

Prochy opened this issue May 9, 2025 · 1 comment
Labels
needs attention Delete label after triage public-client Security-Issue untriaged Do not delete. Needed for Automation

Comments

@Prochy
Copy link

Prochy commented May 9, 2025

Library version used

4.71.2-preview

.NET version

24H2 (OS Build 26100.3775)
Microsoft.NETCore.App 8.0.15
Microsoft.WindowsDesktop.App 8.0.15
Microsoft.AspNetCore.App 8.0.15

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 field Title in the BrokerOptions is ignored. Tested with WithWindowsDesktopFeatures and WithBroker extension. The result is the same. I'm considering this as big security issue as the user has no clue which app is requesting the authorization, it can pop up from random app running in background etc.

If there is Account selection page, the title is "Sign in" but it cannot be change as well, I would like to change it "Company - Sign in" so the user is aware what an application is requesting the authorization.

Obviously the issue is here for longer time see: https://x.com/marcgravell/status/1656208913706909701?s=46&t=Tpb1beI0_8d1EL5lz_inPg

The same happens from the Visual Studio when I want to change account and set different account than selected one.
Image

Relevant code snippets

var app = PublicClientApplicationBuilder
    .Create(_options.ClientId)
    .WithDefaultRedirectUri()
    .WithParentActivityOrWindow(ConsoleWindowHandleProvider.GetConsoleOrTerminalWindow)                
    .WithWindowsDesktopFeatures(new BrokerOptions(BrokerOptions.OperatingSystems.Windows) { Title = "Test App" })
    .Build();

app.AcquireTokenInteractive([])
    .ExecuteAsync();

Expected behavior

The title is correctly set.

Example how it looks in the Teams App which I consider the correct example how it should look like

Image

Identity provider

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

Regression

No response

Solution and workarounds

No response

@Prochy Prochy added untriaged Do not delete. Needed for Automation needs attention Delete label after triage labels May 9, 2025
Copy link

github-actions bot commented May 9, 2025

This issue is related to security. Please pay attention.

Powered by issue-sentinel

@Prochy Prochy changed the title [Bug] Can set WAM window title [Bug] Can't set WAM window title May 9, 2025
@Prochy Prochy changed the title [Bug] Can't set WAM window title [Bug] Can't set window title if using WAM May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs attention Delete label after triage public-client Security-Issue untriaged Do not delete. Needed for Automation
Projects
None yet
Development

No branches or pull requests

1 participant