Visitar URL original
AB#3763811: Fix platform broker empty scope handling by lalimasharda · Pull Request #8863 · AzureAD/microsoft-authentication-library-for-js · GitHub
Skip to content

AB#3763811: Fix platform broker empty scope handling - #8863

Merged
Lalima Sharda (lalimasharda) merged 3 commits into
devfrom
fix/platform-broker-empty-scopes
Sep 23, 2026
Merged

Lalima Sharda (lalimasharda) merged 3 commits into
devfrom
fix/platform-broker-empty-scopes

Conversation

@lalimasharda

@lalimasharda Lalima Sharda (lalimasharda) commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Allow platform broker token requests with an empty scopes array by appending the default OIDC scopes before constructing the ScopeSet, matching web-flow behavior.

Implements

  • AB#3763811 — MSAL JS throws empty_scopes error incorrectly

How to validate

  • Run PlatformAuthInteractionClient.spec.ts and verify requests with empty scopes contain openid profile offline_access.
  • Verify requests with caller-provided scopes preserve those scopes and append the default OIDC scopes.

Validation

  • npm run build:all: passed
  • msal-common npm test -- --runInBand: 48 suites passed; 1169 tests passed
  • msal-browser npm test -- --runInBand: 120 suites passed; 2171 tests passed, 3 skipped
  • npm run lint: passed with two pre-existing warnings
  • npm run format:check: passed
  • npm run apiExtractor: passed
  • npm run beachball:check: passed

Notes

Created by Forge create-pr skill.

assistance: agentic-cli
type: bug
agent-tool: copilot-cli
agent-model: gpt-5.6-sol
work-item: AB#3763811

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 0d4a2cc6-a164-4c8c-9a2a-3f673d68f893
Copilot AI lite review requested due to automatic review settings September 23, 2026 22:07
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 0d4a2cc6-a164-4c8c-9a2a-3f673d68f893
@lalimasharda Lalima Sharda (lalimasharda) added agentic-cli Copilot CLI / terminal agent drove the bulk of the edits bug A problem that needs to be fixed for the feature to function as intended. labels Sep 23, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

No unresolved review issues were identified.

Review effort: Lite
Findings: None

What changed in this PR

Fixes platform broker requests with empty scopes by appending default OIDC scopes before constructing ScopeSet.

Changes:

  • Updates platform scope construction.
  • Adds regression tests for empty and custom scopes.
  • Adds a patch changefile.
File Description
lib/​msal-browser/​test/​interaction_client/​PlatformAuthInteractionClient.spec.ts Tests default scope handling.
lib/​msal-browser/​src/​interaction_client/​PlatformAuthInteractionClient.ts Appends default OIDC scopes before creating ScopeSet.
change/​@azure-msal-browser-platform-broker-empty-scopes.json Records the patch release change.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 0d4a2cc6-a164-4c8c-9a2a-3f673d68f893
@lalimasharda
Lalima Sharda (lalimasharda) merged commit 243748a into dev Sep 23, 2026
78 checks passed
@lalimasharda
Lalima Sharda (lalimasharda) deleted the fix/platform-broker-empty-scopes branch September 23, 2026 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agentic-cli Copilot CLI / terminal agent drove the bulk of the edits bug A problem that needs to be fixed for the feature to function as intended.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants