Skip to content

[Bug] MsalUiRequiredException.Classification does not seem to report useful data #5187

@zachcwillson

Description

@zachcwillson

Library version used

4.67.2, 4.69.1

.NET version

.Net Core 8.0.*

Scenario

PublicClient - desktop app

Is this a new or an existing app?

The app is in production, I haven't upgraded MSAL, but started seeing this issue

Issue description and reproduction steps

We observe that when we get MsalUiRequiredException, if we attempt to inspect .Classification, it always returns back as UiRequiredExceptionClassification.None.

As SubError is internal, we have no way to identify why we are hitting MsalUiRequiredException.

We see these error codes and error tags:

Error Code Error Tag
3399614476 0x2142008D
3399614467 0x21447008
3399548929 0x1E50C30C
3399614467 0x1E50C30C
3399548929 0x1F6DD65E

But we have little understanding of why interactive auth was required.

Over the last 28 days, we have hit "None" for MsalUiRequiredException on 691 unique devices/customers

Relevant code snippets

try
{
    await publicClient.AcquireTokenSilent(scopes, PublicClientApplication.OperatingSystemAccount).ExecuteAsync(ct);
}
catch (MsalUiRequiredException e)
{
    Console.WriteLine(e.Classification);
}

Expected behavior

Either MsalUiRequiredException.Classification contains relevant data, or SubError is moved from internal to public

Identity provider

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

Regression

All

Solution and workarounds

None that we are aware of.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions