Skip to content

Conversation

@Avery-Dunn
Copy link
Contributor

@Avery-Dunn Avery-Dunn commented Nov 3, 2025

In MSAL.NET the WithExtraQueryParameters APIs are receiving two changes: AzureAD/microsoft-authentication-library-for-dotnet#5536

  • Adding the extra query parameters to the cache keys, so that the correct token can be uniquely found
  • Deprecating the existing APIs in favor of one that can allow a customer to control the cache key behavior

This PR updates to the latest MSAL.NET version and handles the new API and cache behavior. It does so by making changes to the TokenAcquisition class, mainly by adjusting the existing MergeExtraQueryParameters helper method to return the Dictionary style that the new WithExtraQueryParameters API expects.

The changes were tested with a locally built version of MSAL.NET, and all existing tests that dealt with extra query parameters worked with minimal or no changes (in TokenAcquisitionAuthorityTests, ExtraParametersTests, DownstreamApiOptionsMergeTests, and DownstreamApiEndpointTests)

@Avery-Dunn Avery-Dunn marked this pull request as ready for review November 10, 2025 22:59
@Avery-Dunn Avery-Dunn requested a review from a team as a code owner November 10, 2025 22:59
@bgavrilMS
Copy link
Member

Pls update the title to say "bump MSAL to version xyz and update use of WithExtraQueryParameters"

@Avery-Dunn Avery-Dunn changed the title Handle changes to WithExtraQueryParameters APIs in MSAL.NET Bump MSAL to version 4.79.0 and handle changes to deprecated WithExtraQueryParameters APIs Nov 11, 2025
Copy link
Collaborator

@jmprieur jmprieur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
I left a couple of comments

@bgavrilMS bgavrilMS force-pushed the avdunn/extraqp-deprecation branch from 845ede5 to a34377b Compare November 12, 2025 11:24
@Avery-Dunn Avery-Dunn changed the title Bump MSAL to version 4.79.0 and handle changes to deprecated WithExtraQueryParameters APIs Bump MSAL to version 4.79.1 and handle changes to deprecated WithExtraQueryParameters APIs Nov 13, 2025
Copy link
Collaborator

@jmprieur jmprieur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Thanks @Avery-Dunn

This was referenced Dec 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants