Skip to content

Conversation

@minhanh-phan
Copy link
Member

@minhanh-phan minhanh-phan commented Nov 24, 2025

Closes #36199

@minhanh-phan minhanh-phan marked this pull request as ready for review November 24, 2025 22:45
Copilot AI review requested due to automatic review settings November 24, 2025 22:45
@minhanh-phan minhanh-phan requested a review from a team as a code owner November 24, 2025 22:45
Copilot finished reviewing on behalf of minhanh-phan November 24, 2025 22:47
Copy link
Contributor

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 performs a cleanup of MSAL-related code in the Identity library, focusing on three main areas: consolidating authority host handling, migrating from deprecated isNode to isNodeLike, and simplifying MsalClientOptions to eliminate nested property duplication.

  • Extracted getAuthorityHost to a dedicated utility file and removed duplicate implementations
  • Replaced deprecated isNode with isNodeLike throughout the codebase for better environment detection
  • Refactored MsalClientOptions to extend CommonClientOptions directly, removing the redundant tokenCredentialOptions nested property

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated no comments.

Show a summary per file
File Description
sdk/identity/identity/src/util/authorityHost.ts New utility file containing the consolidated getAuthorityHost function, replacing previous duplicate implementations
sdk/identity/identity/src/msal/utils.ts Removed getAuthorityHost function (moved to dedicated file) and replaced isNode with isNodeLike
sdk/identity/identity/src/msal/nodeFlows/msalClient.ts Refactored MsalClientOptions interface to extend CommonClientOptions, added proper type definitions for loggingOptions, and updated to use new getAuthorityHost location
sdk/identity/identity/src/client/identityClient.ts Removed duplicate getIdentityClientAuthorityHost function and updated to use consolidated getAuthorityHost from new location
sdk/identity/identity/src/credentials/*.ts Removed redundant tokenCredentialOptions property from createMsalClient calls across all credential files (7 files total) and added type-only imports where appropriate
sdk/identity/identity/test/internal/node/*.spec.ts Updated test files to use isNodeLike instead of isNode and updated function references to use new getAuthorityHost location
sdk/identity/identity/CHANGELOG.md Added entry documenting the refactoring changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Untriaged

Development

Successfully merging this pull request may close these issues.

[Identity] MsalClientOptions Clean Up

1 participant