Skip to content

Conversation

@MattB-msft
Copy link
Member

Ensure that the scopes parameter is checked for null before joining its elements into a string. This prevents potential null reference exceptions. Changes are applied when constructing the cacheKey and setting the "scope" parameter in the parameters dictionary.

Ensure that the `scopes` parameter is checked for null before joining its elements into a string. This prevents potential null reference exceptions. Changes are applied when constructing the `cacheKey` and setting the "scope" parameter in the `parameters` dictionary.
@MattB-msft MattB-msft requested a review from a team as a code owner October 8, 2025 22:54
Copilot AI review requested due to automatic review settings October 8, 2025 22:54
@github-actions github-actions bot added the ML: Core Tags changes to core libraries label Oct 8, 2025
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 adds null safety checks for the scopes parameter in the GetAgenticUserTokenAsync method to prevent potential null reference exceptions. The changes ensure that null scopes are handled gracefully by using empty strings instead of attempting to join null collections.

Key changes:

  • Added null checks before calling string.Join() on the scopes parameter
  • Used empty strings as fallbacks when scopes is null

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

tracyboehrer
tracyboehrer previously approved these changes Oct 10, 2025
Ensure that the `scopes` parameter is checked for null before joining its elements into a string. This prevents potential null reference exceptions. Changes are applied when constructing the `cacheKey` and setting the "scope" parameter in the `parameters` dictionary.
@github-actions github-actions bot added ML: Samples Tags changes to samples ML: Tests Tags changes to tests labels Oct 21, 2025
@MattB-msft MattB-msft enabled auto-merge (squash) October 21, 2025 21:17
@github-actions github-actions bot removed ML: Samples Tags changes to samples ML: Tests Tags changes to tests labels Nov 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ML: Core Tags changes to core libraries

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants