Skip to content

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

Description

@Prochy

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions