Skip to content

AADSTS9000411 Duplicated Value on Angular 20 if using ESBuild #8142

@gabomartin

Description

@gabomartin

Core Library

MSAL.js (@azure/msal-browser)

Core Library Version

4.26.1

Wrapper Library

MSAL Angular (@azure/msal-angular)

Wrapper Library Version

4.0.21

Public or Confidential Client?

Public

Description

After migrating an angular 19 application to Angular 20 the implementation breaks due to the query parameter property names gets renamed to value causing the title error message. This only happens when using the angular aplication (esbuild vite) builder since fallbacking to angular-devkit/build-angular:browser makes the implementation to work again with no code changes.

Error Message

AADSTS9000411 duplicated ‘value’ after being redirected to login.microsoft.

MSAL Logs

I cannot provide logs since the app is highly confindential

Network Trace (Preferrably Fiddler)

  • Sent
  • Pending

MSAL Configuration

export function MSALInstanceFactory(): IPublicClientApplication {
  return new PublicClientApplication({
    auth: {
      clientId: "b5c2e510-4a17-4feb-b219-e55aa5b74144",
      redirectUri: "http://localhost:4200",
      postLogoutRedirectUri: "http://localhost:4200",
    },
    cache: {
      cacheLocation: BrowserCacheLocation.LocalStorage,
    },
  });
}

export function MSALInterceptorConfigFactory(): MsalInterceptorConfiguration {
  const protectedResourceMap = new Map<string, Array<string>>();
  protectedResourceMap.set("https://graph.microsoft.com/v1.0/me", ["user.read"]);

  return {
    interactionType: InteractionType.Redirect,
    protectedResourceMap,
  };
}

export function MSALGuardConfigFactory(): MsalGuardConfiguration {
  return {
    interactionType: InteractionType.Redirect,
    authRequest: {
      scopes: ["user.read"],
    },
    loginFailedRoute: "./login-failed",
  };
}

Relevant Code Snippets

N/A. Using a basic redirect login request will make the library to fail when using application builder.

Reproduction Steps

Implement login redirect with angular 20 application builder (esbuild)
Try to login with a redirect request
Query parameters property names will all be ‘value’ instead of their proper name (clientId, code, etc)

Expected Behavior

Expected behavior would be to be able to login picking an account

Identity Provider

Entra ID (formerly Azure AD) / MSA

Browsers Affected (Select all that apply)

Chrome

Regression

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: Attention 👋Awaiting response from the MSAL.js teambug-unconfirmedA reported bug that needs to be investigated and confirmedmsal-angularRelated to @azure/msal-angular packagemsal-browserRelated to msal-browser packagepublic-clientIssues regarding PublicClientApplicationsquestionCustomer is asking for a clarification, use case or information.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions