Skip to content

[Bug] WAM Error 0, Internal Error Code 540940121 #5885

@CarlT789

Description

@CarlT789

Library version used

unknown

.NET version

This happened when I started VS 2026 and opened a C++ project.

This error was not from our app/project, but from VS 2026, v18.4.1

Image

Scenario

Other - please specify

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

This error happened when I started VS 2026 and opened a project. It was not from our project.

"TF30063: You are not authorized to access <our_page>.visualstudio.com<our_page>" showed up in the output window. When I tried to authenticate, I got a dialog displaying a WAM error.
Error code:0
Error Message: Account has previously been signed out of this application.
Internal Error Code 540940121

I was presented with the option to Continue or Cancel. I pressed Continue, and I appeared to get properly logged in - I could access the NuGet package information.

Relevant code snippets

Expected behavior

Not getting an error.

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

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions