Skip to content

Conversation

Robbie-Microsoft
Copy link
Contributor

This is not unit-testable

@Robbie-Microsoft Robbie-Microsoft requested a review from a team as a code owner October 3, 2025 20:06
@gladjohn gladjohn requested a review from Copilot October 4, 2025 17:47
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds validation to throw an exception when attempting to use IMDSv2 MTLS authentication on non-Windows platforms, as this feature is only supported on Windows.

  • Introduces a new error message for non-Windows platform validation
  • Refactors the MTLS validation logic to use a local function for cleaner error handling
  • Adds platform-specific checks using DesktopOsHelper.IsWindows() before the existing .NET Framework version check

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
MsalErrorMessage.cs Adds new error message constant for non-Windows platform restriction
AcquireTokenForClientParameterBuilder.cs Implements platform validation logic and refactors error handling with local function

@Robbie-Microsoft Robbie-Microsoft merged commit 1c399c3 into rginsburg/msiv2_feature_branch Oct 7, 2025
3 checks passed
@Robbie-Microsoft Robbie-Microsoft deleted the rginsburg/msiv2_throw_when_not_windows branch October 7, 2025 17:03
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.

3 participants