Skip to content

Recent dependency bumps causes MsalUiRequiredException, breaks functionality #129

Closed
@lwestfall

Description

@lwestfall

Describe the bug
The version bumps in the following packages seem to have breaking changes unaccounted for in this repo (I'm not familiar enough to understand what, exactly):

  • Microsoft.Identity.Web
  • Microsoft.Identity.Web.MicrosoftGraph
  • Microsoft.Identity.Web.Ui

Maybe it's something with our Azure App but I consistently get the following exceptions when signing in, and the site is broken after that:

MsalUiRequiredException:
        ErrorCode: user_null
Microsoft.Identity.Client.MsalUiRequiredException: No account or login hint was passed to the AcquireTokenSilent call.

To Reproduce
Steps to reproduce the behavior:

  1. Make sure you've signed out of the application or use private browser
  2. Checkout 7aeeb9a (HEAD at main branch at time of writing)
  3. Try to sign in
  4. Site is broken:
    • Dropdown menu in upper right is incomplete
    • Welcome message for user on home page missing
    • TimeZoneNotSupportedException displayed in calendar (screenshot below)

Expected behavior
Checking out 9b6b9c9 (prior to the version bumps above) seems to solve the issue. I can sign in and view my calendar events. No issues

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser: Edge
  • Version: 117.0.2045.60

Activity

jasonjoh

jasonjoh commented on Oct 11, 2023

@jasonjoh
Member

Thanks for reporting this @lwestfall! I reproduce this as well. It seems with the release of 2.15.1 for the Microsoft.Identity.Web dependencies, they introduced a bug that impacts custom OnTokenValidated handlers, like the one we use in this sample to add Graph information to the claims principal. I believe this is causing the failure.

For now, I would keep all three Microsoft.Identity.Web dependencies (Microsoft.Identity.Web, Microsoft.Identity.Web.UI, and Microsoft.Identity.Web.MicrosoftGraph) at 2.14.0 until a fix is released.

pinned this issue on Oct 11, 2023
added
blockedProgress on this issue or PR is blocked
on Oct 11, 2023
lwestfall

lwestfall commented on Oct 11, 2023

@lwestfall
Author

@jasonjoh thanks for the quick response and for validating my sanity!

crazycga

crazycga commented on Oct 17, 2023

@crazycga

Man, do I feel dumb. I'll close my ticket and show myself out. Thanks @jasonjoh .

jasonjoh

jasonjoh commented on Oct 23, 2023

@jasonjoh
Member

@lwestfall @crazycga Looks like the issue has been resolved in the 2.15.3 versions of the Microsoft.Identity.Web* libraries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockedProgress on this issue or PR is blocked

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @jasonjoh@lwestfall@crazycga

        Issue actions

          Recent dependency bumps causes MsalUiRequiredException, breaks functionality · Issue #129 · microsoftgraph/msgraph-sample-aspnet-core