Skip to content

Added new method WithExtraBodyParameters#3819

Merged
4gust merged 3 commits into
masterfrom
4gust/extrabodyparams
May 25, 2026
Merged

Added new method WithExtraBodyParameters#3819
4gust merged 3 commits into
masterfrom
4gust/extrabodyparams

Conversation

@4gust
Copy link
Copy Markdown
Contributor

@4gust 4gust commented May 18, 2026

This pull request introduces a new extension method to allow adding extra body parameters to token acquisition requests in a composable and fluent way. It also updates the relevant constants, integrates the new feature into the token acquisition pipeline, and adds comprehensive unit tests to ensure correct behavior.

New feature: Add extra body parameters to token requests

  • Added the WithExtraBodyParameters extension method to AcquireTokenOptions, allowing extra body parameters to be included in token acquisition requests. This method merges parameters into any existing collection and supports fluent chaining.
  • Registered the new extension method in the public API surface for both .NET Core and .NET Framework. [1] [2]

Constants and integration

  • Introduced a new constant ExtraBodyParametersKey in Constants.cs for consistent dictionary key usage.
  • Updated internal usage to reference the new constant instead of a hardcoded string in the token acquisition flow.

@4gust 4gust requested a review from a team as a code owner May 18, 2026 16:32
@bgavrilMS bgavrilMS force-pushed the 4gust/extrabodyparams branch from 454d519 to fb59cfd Compare May 19, 2026 12:11
@bgavrilMS
Copy link
Copy Markdown
Member

@4gust - pls merge this to catch next release etc.

@4gust 4gust merged commit 81e9a04 into master May 25, 2026
4 checks passed
@4gust 4gust deleted the 4gust/extrabodyparams branch May 25, 2026 15:07
This was referenced May 25, 2026
github-actions Bot pushed a commit to EelcoLos/nx-tinkering that referenced this pull request May 26, 2026
Updated
[Microsoft.Identity.Web](https://github.com/AzureAD/microsoft-identity-web)
from 4.9.0 to 4.10.0.

<details>
<summary>Release notes</summary>

_Sourced from [Microsoft.Identity.Web's
releases](https://github.com/AzureAD/microsoft-identity-web/releases)._

## 4.10.0

### New features
- Add `WithExtraBodyParameters` fluent API for attaching extra body
parameters to token acquisition requests. See
[#​3819](AzureAD/microsoft-identity-web#3819).
- Add `IConfidentialClientApplicationProvider` extensibility interface
and `CachePartitionKey` support for silent token acquisition. See
[#​3822](AzureAD/microsoft-identity-web#3822).

### Bug fixes
- Redirect URI sanitization in authorization scenarios; centralize
redirect URI validation in a shared helper. See
[#​3825](AzureAD/microsoft-identity-web#3825).
- Reject dSTS-shaped `Authority` values with a clearer exception,
steering users to use `Instance` + `TenantId` instead. See
[#​3805](AzureAD/microsoft-identity-web#3805).
- Improve regex handling and adding length/timeout safeguards for
SameSite User Agent. See
[#​3811](AzureAD/microsoft-identity-web#3811).

### Behavior changes
- **B2C OpenID Connect event handler: LRU cache for issuer address.**
Issuer address lookups in the B2C OIDC event handler are now cached with
an LRU cache, improving performance for repeated lookups. See
[#​3821](AzureAD/microsoft-identity-web#3821).

### Dependencies updates
- Update MSAL.NET to 4.84.1. See
[#​3822](AzureAD/microsoft-identity-web#3822).
- Pin `Microsoft.Kiota.Abstractions` to 1.22.0 for GraphServiceClient.
See
[#​3817](AzureAD/microsoft-identity-web#3817).
- Bump `uuid` and `@​azure/msal-node` in SidecarAdapter TypeScript test
app. See
[#​3826](AzureAD/microsoft-identity-web#3826).
- Bump `qs` in SidecarAdapter TypeScript test app. See
[#​3829](AzureAD/microsoft-identity-web#3829).

Commits viewable in [compare
view](AzureAD/microsoft-identity-web@4.9.0...4.10.0).
</details>

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=Microsoft.Identity.Web&package-manager=nuget&previous-version=4.9.0&new-version=4.10.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Eelco Los <5102501+EelcoLos@users.noreply.github.com>
This was referenced May 26, 2026
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.

4 participants