Skip to content

Bump MSAL to version 4.79.2 and handle changes to deprecated WithExtraQueryParameters APIs - #3583

Merged
Avery-Dunn merged 21 commits into
masterfrom
avdunn/extraqp-deprecation
Nov 17, 2025
Merged

Bump MSAL to version 4.79.2 and handle changes to deprecated WithExtraQueryParameters APIs#3583
Avery-Dunn merged 21 commits into
masterfrom
avdunn/extraqp-deprecation

Conversation

@Avery-Dunn

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

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
Collaborator

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

Comment thread src/Microsoft.Identity.Web.TokenAcquisition/TokenAcquisition.cs
Comment thread src/Microsoft.Identity.Web.TokenAcquisition/TokenAcquisition.cs
@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
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM
Thanks Avery-Dunn

Comment thread Directory.Build.props Outdated
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.

6 participants