Skip to content

Send Native Auth V2 authorize scopes and claims, Fixes AB#3784690 - #3308

Closed
Disha Janardhan (djanardhan98) wants to merge 18 commits into
djanardhan/native-auth-v2-unified-errorsfrom
djanardhan/native-auth-v2-authorize-inputs
Closed

Disha Janardhan (djanardhan98) wants to merge 18 commits into
djanardhan/native-auth-v2-unified-errorsfrom
djanardhan/native-auth-v2-authorize-inputs

Conversation

@djanardhan98

@djanardhan98 Disha Janardhan (djanardhan98) commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Port Common Native Auth V2 authorize-request inputs and related OTP parity from AzureAD/microsoft-authentication-library-for-js#8898.

  • Build on the existing authorize-challenge scope serialization and add initial claims propagation.
  • Include default OIDC scopes for sign-in, sign-up, and reset; canonicalize only recognized OIDC defaults while preserving resource scopes.
  • Preserve entry scopes for absent continuation inputs and honor explicitly empty continuation inputs.
  • Exclude claims from token serialization while retaining local metadata; keep scopes on token requests.
  • Allow empty OTP values to reach service validation and preserve existing password-to-email fallback and V1 behavior.

Approved wire policy: scopes and optional claims at initial authorize-challenge, scopes without claims at token exchange, neither on other intermediate requests. This intentionally follows JS behavior rather than the work item's literal entry-only scope wording.

Fixes AB#3784690

Dependencies

Stacked on the separate Common unified-errors PR: #3307. Its base is the errors branch so the workstream diff stays isolated.
Consumed by the paired MSAL authorize-inputs PR: AzureAD/microsoft-authentication-library-for-android#2619.
Merge the errors dependency first, then retarget this PR to dev.

Validation

Scopes/claims snapshot: 661 selected unit tests passed (218 MSAL, 349 Common4j, 94 Common Android), with zero failures, errors, or skips in the final XML reports.
Coverage includes all three initial entries and token paths, claims wire encoding, continuation scope retention/override, canonical OIDC defaults with preserved resource casing/duplicates, empty OTP submission, and standalone V1 regressions.
Final integrated-stack PR2601 validation: 20 live signup/reset E2E tests and 4 recorder tests passed, with 3 known duplicate-account service-test skips. One Mail.tm /accounts HTTP 429 attempt passed on the existing automatic retry; no assertions or retry configuration were changed.

Fixes AB#3784690

Initial authorize-challenge carries scopes and claims; token carries scope only. Preserve continuation and local claims metadata. Include JS8898 OTP service-validation parity without altering V1.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 0bcd671b-73fa-4ee6-bcd6-65d7eea4d753
Fixes AB#3784695

Move diagnostic arguments into their authorize/continue/token APIError constructors; preserve errors-only scope behavior. Independently compiled and covered by focused MSAL/Common suites.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 0bcd671b-73fa-4ee6-bcd6-65d7eea4d753
(cherry picked from commit 3265533)
Fixes AB#3784690

Canonicalize recognized OIDC defaults to lowercase exactly once at entry and token exchange, preserving resource scope casing, order and duplicates. Keep V1 behavior unchanged. Cover all three entry and token paths with red-green regressions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 0bcd671b-73fa-4ee6-bcd6-65d7eea4d753
Fixes AB#3784690

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 0bcd671b-73fa-4ee6-bcd6-65d7eea4d753
@github-actions

Copy link
Copy Markdown

✅ Work item link check complete. Description contains link AB#3784690 to an Azure Boards work item.

@github-actions github-actions Bot changed the title Send Native Auth V2 authorize scopes and claims with JS parity Send Native Auth V2 authorize scopes and claims with JS parity, Fixes AB#3784690 Oct 12, 2026
@github-actions

Copy link
Copy Markdown

✅ Work item link check complete. Description contains link AB#3784690 to an Azure Boards work item.

Mohit (mohitc1) and others added 10 commits October 12, 2026 13:23
…3305)

## Summary

Fixes
[AB#3784571](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_workitems/edit/3784571)

- Preserve `DeviceTokenResult` and its members through Common's consumer
ProGuard rules so Moshi can construct and populate the nested response
model in minified clients.
- Move the V1 device-token success log after deserialization and
extraction of a non-null, explicitly typed result.
- Add regression tests for successful parsing, malformed JSON, and a
null result. Failed parsing must not emit the success message.

## Why

The existing broad identity rule permits shrinking and optimization.
Protocol implementations and device-registration records have stronger
keep rules, but the nested `DeviceTokenResult` model does not implement
either protected interface. Referencing the model or its getters does
not preserve reflective construction.

The broker and calling application are optimized separately. An isolated
client-side R8 reproduction loses the model's reflective construction
surface without the new rule and succeeds with it.

## Validation

- After integrating latest `dev`, freshly ran
`:common:testLocalDebugUnitTest --tests
com.microsoft.identity.deviceregistration.api.DeviceRegistrationClientApplicationTest
--rerun`: **18 tests passed**, none skipped.
- `:common:bundleLocalReleaseAar` succeeded; verified that the resulting
AAR contains the new consumer keep rule.
- Earlier isolated R8 validation with packaged rules preserved all eight
token-result fields and absent optional values; removing only the new
rule reproduced reflective deserialization failure.
- Expanded R8 flow validation also covered registration lookup/list,
both record subtypes, V0/V1 requests and responses, and the UUID
adapter. No additional keep rules were needed.
- `git diff --check` passed.

## Scope and follow-up

- No public API, wire-format, V0 behavior, or exception-mapping changes.
- No changelog update.
- Keep this PR in draft pending a consuming application's minified
release-build retest. The isolated R8 failure demonstrates the
preservation defect, but does not establish the cause of every
device-token NPE.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…4, Fixes AB#3778034 (#3292)

[AB#3778034](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_workitems/edit/3778034)

## Summary

- Extend the Common code-review guidance for interface, abstract,
overridable, and callback calls made while a monitor or lock is held.
- Route implementation, injection, hierarchy, callback, and registration
changes into this analysis even when the caller's synchronization is
unchanged.
- Keep `.github/copilot-instructions.md` and the skill's routing,
concurrency reference, and false-positive rules consistent.

## Review behavior

- Resolve the concrete held lock and runtime target before tracing
additional lock acquisition, wait dependencies, or callback access to a
partially updated invariant.
- Distinguish hidden-override ABBA cycles, awaited workers needing the
held lock, and non-reentrant Mutex reacquisition from safe consistent
ordering and benign JVM monitor reentry.
- Distinguish synchronous invocation from genuinely deferred
registration/queueing. A verified collection leaf is not a blanket
exemption for operations such as `contains` that can invoke user-defined
`equals`, or for custom implementations.
- Bound analysis of unavailable external, native, or reflective
implementations. Unknown dispatch alone is not a defect; any contract
clarification is specific and non-blocking rather than an invented
High-severity deadlock.
- Recommend an open-call/snapshot design only when state validity,
ordering, lifetime, and atomicity remain protected, with
reservation/revalidation where necessary.
- Deduplicate overlap with the existing lock-order rules and determine
severity from demonstrated impact, not from interface syntax.

## Scope

Four existing documentation files only. The preceding general
synchronization analysis, corrected guarded cache example, and existing
suppressions are preserved. Flighting recommendations, runtime
authentication changes, static analyzers, dependencies, and CI additions
are out of scope.

## Kotlin-first examples

- Use Kotlin for the language-neutral lock-order, mutable-monitor,
callback-state, collection-dispatch, snapshot/revalidation,
critical-section, and helper-extraction examples.
- Preserve explicit `open`/`override`, JVM monitor identity, and
safe/unsafe distinctions when translating. JVM `synchronized` remains
separate from coroutine `Mutex`; this is not a conversion of
monitor-based examples to coroutines.
- Retain compact Java comparisons for virtual-by-default methods and
instance synchronized methods, plus the legacy `Thread.join` wait-cycle
example.
- The main concurrency reference now contains seventeen Kotlin and three
Java code blocks, rather than four Kotlin and twelve Java blocks.
- Review policy, severities, exclusions, and suppressions are unchanged
by this example-language update. The newer upstream merge is retained in
the branch history.

## Verification

- Validated 114 structure, semantic, and scope assertions on the updated
examples, including frontmatter, links/anchors, code fences, and TOC.
- Reviewed 35 positive, negative, unknown-contract, and remediation
cases in the session acceptance matrix.
- Compiled all seventeen exact Kotlin blocks with the cached
repository-pinned Kotlin 2.0.21 compiler and
`kotlinx-coroutines-core-jvm` 1.6.4, using owner-only wrappers for
fragments. All three retained Java blocks also compile.
- A bounded JVM harness passed eighty-one assertions covering actual
Kotlin lock cycles, ordering, callback invariants, deferred delivery,
custom collection dispatch, invalidation, mutable monitors, synchronized
helper protection, Java join waits, and documented Mutex
cancellation/release behavior.
- Preserved the meaning of preceding general synchronization examples,
guarded cache guidance, and unrelated Common references.
- Only documented Mutex scenarios are included in the runtime results;
the supplemental repeated-owner-token probe is not claimed as validated.
- No repository dependencies or global tooling were installed. No
production Android build or live Copilot detection-accuracy benchmark
was run.
- Checked the staged and committed diffs for whitespace errors and
independently verified the published PR head.

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ht (#3300)

Added ENABLE_NATIVE_DEVICE_CA_MANAGEMENT_APP_HANDOFF in PR
#3290
This PR contains the premortem doc for the same flight

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
### Issue
- eSTS/Unified platform team made some changes recently to some of the
total loss recovery and VID stepup CA button URLs. The buttons are
supposed to push the user out of the webview. The way this happens is
when they trigger target=_blank urls. However, they previously used to
have a pattern like /tlr/start/ when they. But now, there is no such set
pattern and they cannot add it as well due to some code complexities.
- Previously, we relied on the path /tlr/start/ and conditionally
enabled mWebView.getSettings().setSupportMultipleWindows.
- But now, we have to enable it for all URLs as there is no
deterministic way to figure out a TLR/Stepup URL needed for VID
scenarios.

### Fix
- We will be enabling setting
mWebView.getSettings().setSupportMultipleWindows(true) by default. The
changes are put behind a flight, so we should be able to disable it if
needed.
- Once it was enabled, the button that triggers verified credential
presentation in stepup flows also needed special handling as
open-id:vc// scheme url also is triggered with target=_blank. We were
previously only allowing https schemes. Note, this does not need to be
put behind flight as we are anyway protecting the whole changes under
CommonFlight.ENABLE_WEBVIEW_MULTIPLE_WINDOWS
- Also, iOS enabled this behavior about three months ago and has not
reported issues.
- eSTS code review confirmed `target=_blank` is currently used for
auxiliary URLs such as Terms of Use, privacy, and help documentation.

- Note : We have raised a request to eSTS to atleast add a Query
parameter for us to make this process more deterministic. They have
raised a PR
https://msazure.visualstudio.com/One/_git/ESTS-Main/pullrequest/17442421.
I will test with this fix and if it works, I will create another PR to
reduce the risk.


### Summary
- Handle `target=_blank` OpenID VC links in the authentication WebView
through the existing wallet handler.
- Route user-initiated HTTPS popups to the system browser; allow
non-user-initiated popups inline only for HTTPS URLs and reject other
schemes.
- Add routing and telemetry coverage.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…784684 (#3306)

## Summary
- Add `getPreprovisioningBlob` with an optional resource-account ID.
- Add combined device/resource-account registration returning both
records.
- Add Java protocol DTOs using the existing Moshi serializer, focused
tests, and concise API documentation.

## Scope
Common API and IPC contracts only. Broker implementation follows
separately. Existing registration APIs remain unchanged. No changelog
changes.

## Validation
69 focused device-registration tests passed across `common4j:test` and
`common:testLocalDebugUnitTest` (0 failures, 0 skipped).


[AB#3784684](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_workitems/edit/3784684)

```text
<!-- BEGIN pr-telemetry -->
assistance: agentic-ide
type: feature
agent-tool: copilot-chat
agent-model: n/a
work-item: [AB#3784684](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_workitems/edit/3784684)
<!-- END pr-telemetry -->
```

---------

Co-authored-by: Mohit <mchand@microsoft.com>
#3312)

## Work item


[AB#3766458](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_workitems/edit/3766458)


<html>
<body>
<!--StartFragment-->
<div style="font-family: &#x22;Segoe UI&#x22;, -apple-system,
BlinkMacSystemFont, &#x22;Noto Sans&#x22;, Helvetica, Arial, sans-serif;
font-size: 16px; line-height: 1.5; color: #1f2328; word-wrap:
break-word;"><h2 style="font-size: 1.5em; font-weight: 600; margin: 24px
0 16px; line-height: 1.25; color: #1f2328; border-bottom: 1px solid
#d1d9e0b3; padding-bottom: 0.3em;">Summary</h2>
<p style="margin: 0 0 16px;">Changes <code style="background-color:
#eff1f3; padding: 0.2em 0.4em; border-radius: 6px; font-family:
ui-monospace, SFMono-Regular, &#x22;SF Mono&#x22;, Menlo, Consolas,
&#x22;Liberation Mono&#x22;, monospace; font-size: 85%; color:
#1f2328;">ENABLE_DEVICE_CA_AUTHORIZE_ONLY_CREDENTIAL_FORWARDING</code>
from default-on to default-off so the authorize-only behavior introduced
by #3287 can be enabled progressively through ECS instead of applying
automatically to every Common consumer.</p>
<p style="margin: 0 0 16px;">This PR does not change the Device-CA
routing implementation, browser fallback behavior, or telemetry schema.
It changes only the flight’s fallback/default state and updates the
associated documentation and tests.</p>
<h2 style="font-size: 1.5em; font-weight: 600; margin: 24px 0 16px;
line-height: 1.25; color: #1f2328; border-bottom: 1px solid #d1d9e0b3;
padding-bottom: 0.3em;">Tracking</h2>
<p style="margin: 0 0 16px;">This PR is the approved follow-up to the
Device-CA authorize-only credential-forwarding work in Common. The
corresponding Azure DevOps PBI remains the internal source for rollout
ownership, acceptance criteria, and release tracking. Its identifier is
intentionally omitted from this public repository’s PR description.</p>
<h2 style="font-size: 1.5em; font-weight: 600; margin: 24px 0 16px;
line-height: 1.25; color: #1f2328; border-bottom: 1px solid #d1d9e0b3;
padding-bottom: 0.3em;">Background</h2>
<p style="margin: 0 0 16px;">The authorize-only forwarding
implementation prevents the original WebView request headers from being
attached to Device-CA navigation when the flight is enabled. This
ensures credential forwarding occurs only through the validated WebCP
authorize path.</p>
<p style="margin: 0 0 16px;">The initial implementation defaulted the
flight to <code style="background-color: #eff1f3; padding: 0.2em 0.4em;
border-radius: 6px; font-family: ui-monospace, SFMono-Regular, &#x22;SF
Mono&#x22;, Menlo, Consolas, &#x22;Liberation Mono&#x22;, monospace;
font-size: 85%; color: #1f2328;">true</code>. This follow-up changes the
rollout policy so both Broker-hosted and brokerless Common consumers
begin with the feature disabled. Broker-hosted flows can then be enabled
gradually by setting the Common flight to <code style="background-color:
#eff1f3; padding: 0.2em 0.4em; border-radius: 6px; font-family:
ui-monospace, SFMono-Regular, &#x22;SF Mono&#x22;, Menlo, Consolas,
&#x22;Liberation Mono&#x22;, monospace; font-size: 85%; color:
#1f2328;">true</code> through Broker ECS.</p>
<p style="margin: 0 0 16px;">No separate Broker flight is required.
Broker’s ECS provider can resolve the existing Common flight
directly.</p>
<h2 style="font-size: 1.5em; font-weight: 600; margin: 24px 0 16px;
line-height: 1.25; color: #1f2328; border-bottom: 1px solid #d1d9e0b3;
padding-bottom: 0.3em;">Behavior</h2>

Flight value | Device-CA WebView behavior | Telemetry
-- | -- | --
Missing or false | Uses the legacy path and loads the Device-CA URL with
the original request headers |
device_ca_authorize_only_forwarding_enabled=false;
device_ca_request_headers_skipped is not emitted
true | Uses authorize-only forwarding and loads the Device-CA URL
without the original request headers |
device_ca_authorize_only_forwarding_enabled=true;
device_ca_request_headers_skipped=true


<p style="margin: 0 0 16px;">An explicit ECS value of <code
style="background-color: #eff1f3; padding: 0.2em 0.4em; border-radius:
6px; font-family: ui-monospace, SFMono-Regular, &#x22;SF Mono&#x22;,
Menlo, Consolas, &#x22;Liberation Mono&#x22;, monospace; font-size: 85%;
color: #1f2328;">true</code> enables authorize-only forwarding for
selected Broker cohorts. An explicit value of <code
style="background-color: #eff1f3; padding: 0.2em 0.4em; border-radius:
6px; font-family: ui-monospace, SFMono-Regular, &#x22;SF Mono&#x22;,
Menlo, Consolas, &#x22;Liberation Mono&#x22;, monospace; font-size: 85%;
color: #1f2328;">false</code> keeps or restores the legacy behavior.</p>
<p style="margin: 0 0 16px;">Consumers that do not install an ECS-backed
or host-provided Common flight manager—including brokerless consumers
relying on Common defaults—remain on the default-off legacy path.</p>
<h2 style="font-size: 1.5em; font-weight: 600; margin: 24px 0 16px;
line-height: 1.25; color: #1f2328; border-bottom: 1px solid #d1d9e0b3;
padding-bottom: 0.3em;">Changes</h2>
<ul style="padding-left: 2em; margin: 0 0 16px;">
<li>Change <code style="background-color: #eff1f3; padding: 0.2em 0.4em;
border-radius: 6px; font-family: ui-monospace, SFMono-Regular, &#x22;SF
Mono&#x22;, Menlo, Consolas, &#x22;Liberation Mono&#x22;, monospace;
font-size: 85%; color:
#1f2328;">ENABLE_DEVICE_CA_AUTHORIZE_ONLY_CREDENTIAL_FORWARDING</code>
default from <code style="background-color: #eff1f3; padding: 0.2em
0.4em; border-radius: 6px; font-family: ui-monospace, SFMono-Regular,
&#x22;SF Mono&#x22;, Menlo, Consolas, &#x22;Liberation Mono&#x22;,
monospace; font-size: 85%; color: #1f2328;">true</code> to <code
style="background-color: #eff1f3; padding: 0.2em 0.4em; border-radius:
6px; font-family: ui-monospace, SFMono-Regular, &#x22;SF Mono&#x22;,
Menlo, Consolas, &#x22;Liberation Mono&#x22;, monospace; font-size: 85%;
color: #1f2328;">false</code>.</li>
<li>Update the flight documentation to describe explicit opt-in and
gradual rollout.</li>
<li>Update the flight configuration assertion to expect <code
style="background-color: #eff1f3; padding: 0.2em 0.4em; border-radius:
6px; font-family: ui-monospace, SFMono-Regular, &#x22;SF Mono&#x22;,
Menlo, Consolas, &#x22;Liberation Mono&#x22;, monospace; font-size: 85%;
color: #1f2328;">Boolean.FALSE</code>.</li>
<li>Add router-level coverage confirming that the disabled path uses the
existing request-header loader.</li>
<li>Add a separate <code style="background-color: #eff1f3; padding:
0.2em 0.4em; border-radius: 6px; font-family: ui-monospace,
SFMono-Regular, &#x22;SF Mono&#x22;, Menlo, Consolas, &#x22;Liberation
Mono&#x22;, monospace; font-size: 85%; color: #1f2328;">vNext</code>
changelog entry for the default-off rollout policy without rewriting the
original authorize-only forwarding entry.</li>
</ul>
<h2 style="font-size: 1.5em; font-weight: 600; margin: 24px 0 16px;
line-height: 1.25; color: #1f2328; border-bottom: 1px solid #d1d9e0b3;
padding-bottom: 0.3em;">Rollout plan</h2>
<p style="margin: 0 0 16px;">The initial rollout will:</p>
<ol style="padding-left: 2em; margin: 0 0 16px;">
<li>Keep the Common fallback value at <code style="background-color:
#eff1f3; padding: 0.2em 0.4em; border-radius: 6px; font-family:
ui-monospace, SFMono-Regular, &#x22;SF Mono&#x22;, Menlo, Consolas,
&#x22;Liberation Mono&#x22;, monospace; font-size: 85%; color:
#1f2328;">false</code>.</li>
<li>Set the Common flight to <code style="background-color: #eff1f3;
padding: 0.2em 0.4em; border-radius: 6px; font-family: ui-monospace,
SFMono-Regular, &#x22;SF Mono&#x22;, Menlo, Consolas, &#x22;Liberation
Mono&#x22;, monospace; font-size: 85%; color: #1f2328;">true</code>
through ECS for selected Broker cohorts.</li>
<li>Compare control (<code style="background-color: #eff1f3; padding:
0.2em 0.4em; border-radius: 6px; font-family: ui-monospace,
SFMono-Regular, &#x22;SF Mono&#x22;, Menlo, Consolas, &#x22;Liberation
Mono&#x22;, monospace; font-size: 85%; color: #1f2328;">false</code>)
and treatment (<code style="background-color: #eff1f3; padding: 0.2em
0.4em; border-radius: 6px; font-family: ui-monospace, SFMono-Regular,
&#x22;SF Mono&#x22;, Menlo, Consolas, &#x22;Liberation Mono&#x22;,
monospace; font-size: 85%; color: #1f2328;">true</code>) telemetry.</li>
<li>Expand treatment gradually after each rollout stage is
validated.</li>
<li>Use an explicit ECS value of <code style="background-color: #eff1f3;
padding: 0.2em 0.4em; border-radius: 6px; font-family: ui-monospace,
SFMono-Regular, &#x22;SF Mono&#x22;, Menlo, Consolas, &#x22;Liberation
Mono&#x22;, monospace; font-size: 85%; color: #1f2328;">false</code> for
control or rollback.</li>
</ol>
<p style="margin: 0 0 16px;">Removing an ECS assignment should not be
treated as the rollback mechanism because clients may retain previously
cached configuration. Rollback should explicitly deliver <code
style="background-color: #eff1f3; padding: 0.2em 0.4em; border-radius:
6px; font-family: ui-monospace, SFMono-Regular, &#x22;SF Mono&#x22;,
Menlo, Consolas, &#x22;Liberation Mono&#x22;, monospace; font-size: 85%;
color: #1f2328;">false</code>.</p>
<p style="margin: 0 0 16px;">Brokerless MSAL and OneAuth-hosted flows
are intentionally default-off and are outside the Broker ECS rollout.
Enabling brokerless flows later requires a separate host-controlled
mechanism or a future change to the Common default.</p>
<h2 style="font-size: 1.5em; font-weight: 600; margin: 24px 0 16px;
line-height: 1.25; color: #1f2328; border-bottom: 1px solid #d1d9e0b3;
padding-bottom: 0.3em;">Security considerations</h2>
<p style="margin: 0 0 16px;">This is an intentional rollout-policy
change. When the flight is missing or disabled, Common retains the
legacy behavior of forwarding the original request headers during
Device-CA WebView navigation. Those headers may include
credential-bearing values.</p>
<p style="margin: 0 0 16px;">When the flight resolves to <code
style="background-color: #eff1f3; padding: 0.2em 0.4em; border-radius:
6px; font-family: ui-monospace, SFMono-Regular, &#x22;SF Mono&#x22;,
Menlo, Consolas, &#x22;Liberation Mono&#x22;, monospace; font-size: 85%;
color: #1f2328;">true</code>, Common loads the Device-CA URL without the
original request headers. Credential forwarding is then limited to the
validated WebCP authorize path.</p>
<p style="margin: 0 0 16px;">Browser fallback remains independent of
this flight. This PR does not add URL, request-header, credential, PRT,
host, login-hint, or other sensitive data to telemetry.</p>
<h2 style="font-size: 1.5em; font-weight: 600; margin: 24px 0 16px;
line-height: 1.25; color: #1f2328; border-bottom: 1px solid #d1d9e0b3;
padding-bottom: 0.3em;">Telemetry</h2>
<p style="margin: 0 0 16px;">The existing bounded boolean attributes
remain unchanged:</p>
<ul style="padding-left: 2em; margin: 0 0 16px;">
<li><code style="background-color: #eff1f3; padding: 0.2em 0.4em;
border-radius: 6px; font-family: ui-monospace, SFMono-Regular, &#x22;SF
Mono&#x22;, Menlo, Consolas, &#x22;Liberation Mono&#x22;, monospace;
font-size: 85%; color:
#1f2328;">device_ca_authorize_only_forwarding_enabled</code></li>
<li><code style="background-color: #eff1f3; padding: 0.2em 0.4em;
border-radius: 6px; font-family: ui-monospace, SFMono-Regular, &#x22;SF
Mono&#x22;, Menlo, Consolas, &#x22;Liberation Mono&#x22;, monospace;
font-size: 85%; color:
#1f2328;">device_ca_request_headers_skipped</code></li>
</ul>
<p style="margin: 0 0 16px;">Expected interpretation:</p>
<ul style="padding-left: 2em; margin: 0 0 16px;">
<li>Control or default-off traffic emits <code style="background-color:
#eff1f3; padding: 0.2em 0.4em; border-radius: 6px; font-family:
ui-monospace, SFMono-Regular, &#x22;SF Mono&#x22;, Menlo, Consolas,
&#x22;Liberation Mono&#x22;, monospace; font-size: 85%; color:
#1f2328;">device_ca_authorize_only_forwarding_enabled=false</code>.</li>
<li><code style="background-color: #eff1f3; padding: 0.2em 0.4em;
border-radius: 6px; font-family: ui-monospace, SFMono-Regular, &#x22;SF
Mono&#x22;, Menlo, Consolas, &#x22;Liberation Mono&#x22;, monospace;
font-size: 85%; color:
#1f2328;">device_ca_request_headers_skipped</code> is absent when the
feature is disabled because the legacy header-forwarding path is
used.</li>
<li>Treatment traffic emits <code style="background-color: #eff1f3;
padding: 0.2em 0.4em; border-radius: 6px; font-family: ui-monospace,
SFMono-Regular, &#x22;SF Mono&#x22;, Menlo, Consolas, &#x22;Liberation
Mono&#x22;, monospace; font-size: 85%; color:
#1f2328;">device_ca_authorize_only_forwarding_enabled=true</code> and
<code style="background-color: #eff1f3; padding: 0.2em 0.4em;
border-radius: 6px; font-family: ui-monospace, SFMono-Regular, &#x22;SF
Mono&#x22;, Menlo, Consolas, &#x22;Liberation Mono&#x22;, monospace;
font-size: 85%; color:
#1f2328;">device_ca_request_headers_skipped=true</code>.</li>
</ul>
<h2 style="font-size: 1.5em; font-weight: 600; margin: 24px 0 16px;
line-height: 1.25; color: #1f2328; border-bottom: 1px solid #d1d9e0b3;
padding-bottom: 0.3em;">Validation</h2>
<p style="margin: 0 0 16px;">The following validation completed
successfully:</p>
<ul style="padding-left: 2em; margin: 0 0 16px;">
<li>Focused Common unit tests:
<ul style="padding-left: 2em; margin: 0 0 16px;">
<li><code style="background-color: #eff1f3; padding: 0.2em 0.4em;
border-radius: 6px; font-family: ui-monospace, SFMono-Regular, &#x22;SF
Mono&#x22;, Menlo, Consolas, &#x22;Liberation Mono&#x22;, monospace;
font-size: 85%; color:
#1f2328;">AzureActiveDirectoryWebViewClientTest</code></li>
<li><code style="background-color: #eff1f3; padding: 0.2em 0.4em;
border-radius: 6px; font-family: ui-monospace, SFMono-Regular, &#x22;SF
Mono&#x22;, Menlo, Consolas, &#x22;Liberation Mono&#x22;, monospace;
font-size: 85%; color: #1f2328;">DeviceCaRequestRouterTest</code></li>
</ul>
</li>
<li>Common local-debug assembly:
<ul style="padding-left: 2em; margin: 0 0 16px;">
<li><code style="background-color: #eff1f3; padding: 0.2em 0.4em;
border-radius: 6px; font-family: ui-monospace, SFMono-Regular, &#x22;SF
Mono&#x22;, Menlo, Consolas, &#x22;Liberation Mono&#x22;, monospace;
font-size: 85%; color: #1f2328;">:common:assembleLocalDebug</code></li>
</ul>
</li>
</ul>
<p style="margin: 0 0 16px;">Commands:</p>
<pre style="background-color: #f6f8fa; border-radius: 6px; padding:
16px; margin: 0 0 16px; overflow: auto; font-family: ui-monospace,
SFMono-Regular, &#x22;SF Mono&#x22;, Menlo, Consolas, &#x22;Liberation
Mono&#x22;, monospace; font-size: 85%; line-height: 1.45; color:
#1f2328;"><code class="language-powershell">.\gradlew.bat
:common:testLocalDebugUnitTest `
--tests
"com.microsoft.identity.common.internal.ui.webview.AzureActiveDirectoryWebViewClientTest"
`
--tests
"com.microsoft.identity.common.internal.ui.webview.DeviceCaRequestRouterTest"
`
  --no-daemon

.\gradlew.bat :common:assembleLocalDebug --no-daemon --console=plain
</code></pre>
<h2 style="font-size: 1.5em; font-weight: 600; margin: 24px 0 16px;
line-height: 1.25; color: #1f2328; border-bottom: 1px solid #d1d9e0b3;
padding-bottom: 0.3em;">Review notes</h2>
<p style="margin: 0 0 16px;">Two independent reviews were run against
the original immutable implementation diff:</p>
<ul style="padding-left: 2em; margin: 0 0 16px;">
<li>One reviewer reported no actionable findings.</li>
<li>One reviewer identified that default-off restores legacy
credential-header forwarding when ECS or another flight provider is
unavailable.</li>
</ul>
<p style="margin: 0 0 16px;">That behavior is understood and accepted as
the intentional consequence of the approved default-off gradual-rollout
policy.</p></div>
<!--EndFragment-->
</body>
</html>

Co-authored-by: prsaminathan <prsaminathan@microsoft.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…3785260 (#3304)

## Summary
- Recognize `broker_webview_external_browser=1` on HTTPS navigations in
Common WebViews, including brokered and brokerless flows.
- Gate handling with the default-on
`EnableBrokerWebViewExternalBrowserRedirect` Common flight.
- Launch the original marked URL unchanged in the system browser and
keep the current authorization session active.
- If no browser can handle the URL or the external launch fails, return
control to the WebView so it loads the original URL; do not complete or
cancel authorization.
- Emit `ProcessWebsiteRequest` telemetry with
`operation_outcome=broker_external_browser_launched` and
`is_redirect_url_opened_in_browser=true` on success, or
`operation_outcome=broker_external_browser_launch_failed` and
`is_redirect_url_opened_in_browser=false` when falling back to the
WebView.

## Testing
- Added focused unit coverage for exact marker parsing, HTTPS
eligibility in brokered and brokerless flows, flight behavior, unchanged
URL forwarding, successful browser launch, WebView fallback, callback
behavior, and telemetry.
- Common build/test, lint, SpotBugs, consumer assembly, and
instrumented-test validations passed on the prior PR revision.

## Work item

[AB#3781149](https://identitydivision.visualstudio.com/Engineering/_workitems/edit/3781149)

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
## Summary
- add the rollout premortem for broker external-browser redirects
- add the production monitoring dashboard queries and interpretation
guidance
- document brokered and brokerless eligibility plus Broker-dashboard
coverage limits
- document best-effort eSTS correlation when `correlation_id_v2` is
available

## Validation
- `git diff --cached --check`
- documentation-only change

Related implementation: #3304
Related work item:
[AB#3781149](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_workitems/edit/3781149)

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
[AB#3780783](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_workitems/edit/3780783)

## Summary
- Register one Island production family list with 14 package/certificate
identities over eight package names: six Play Store signers plus the
shared direct-distribution signer for all eight variants, including
IslandDev and Dev Intune.
- Island clarified that its historically named debug/userdebug signer is
a production pre-store signing key for directly distributed
enterprise/MDM APKs. All eight direct-distribution package identities
are explicitly approved for production support.
- Simplify AppFamily to one apps set. Derive BROWSER_SSO_AUTHORIZED_APPS
from Chrome and Island families; preserve App/IAppIdentity and existing
Chrome/MSAL test-app behavior.
- Remove Island debug-trust gating and family debug-selection machinery.
Every Island variant remains subject to the existing default-off Island
flight in Broker; no additional Dev-specific flight.
- Keep explicit package/certificate checks and exclude Island from
unrelated privileged allowlists.

## Verification
- The simplified AppFamily model and unchanged App source compiled with
cached Kotlin 2.0.21; all six isolated JUnit 4.13.2 model tests passed.
- Added exact 14-identity/eight-package tests and production Broker
regressions for all identities with debug trust disabled, unlisted/wrong
signers, and rollback across every identity.
- Full targeted Gradle validation remains blocked before compilation by
NewAndroid HTTP 401 for BouncyCastle 1.86 and OpenTelemetry 1.62.0.
Android integration compilation/tests remain unverified.
- Actual APK certificate matching and partner E2E remain rollout
prerequisites. Fingerprint length verifies SHA-512-sized format, not
signer authenticity.

## Dependencies and rollout
- Companion Broker PR:
https://msft.ghe.com/security/ad-accounts-for-android/pull/330
([AB#3780785](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_workitems/edit/3780785)).
- Merge Common first and ship both changes together; older Broker code
consuming the expanded allowlist does not enforce the new Island flight.
- No live ECS configuration or production enablement is changed.

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…s AB#3751475 (#3311)

## Summary
- Remove native MSAL silent-caller UID/package and redirect checks from
Common command-parameter validation; Broker performs these checks at
first-hop request admission, before local execution or passthrough.
- Retain parameter preconditions and the existing WEB_APPS silent
allowlist check in Common.
- Update Common flight/API documentation and parameter tests to reflect
the new ownership boundary.

## Validation
- `:common4j:compileJava` passed.
- `:common4j:test --tests
com.microsoft.identity.common.java.commands.parameters.BrokerSilentTokenCommandParametersTest`
passed.

## Rollout dependency
**Do not merge or ship this change without the paired Broker
ingress-validation change.** A Broker without first-hop validation must
not consume a Common version that removes the command-level native
caller check. WEB_APPS validation remains in Common; moving it to
first-hop WebApps admission is deferred for follow-up review.


[AB#3751475](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_workitems/edit/3751475)

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
## Summary
- initialize trust-dependent AppRegistry snapshots while debug broker
trust is enabled
- prevent test ordering from producing a production-only force-discovery
allow-list

## Validation
- AppRegistryTest: 20 tests passed
- BUILD SUCCESSFUL

## Work item

[AB#3791209](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_workitems/edit/3791209)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@djanardhan98 Disha Janardhan (djanardhan98) changed the title Send Native Auth V2 authorize scopes and claims with JS parity, Fixes AB#3784690 Send Native Auth V2 authorize scopes and claims, Fixes AB#3784690 Oct 16, 2026
…3307)

## Summary

Preserve Common diagnostics needed by the shared Android Native Auth V2
error surface, matching
AzureAD/microsoft-authentication-library-for-js#8900.

- Retain suberrors and attribute-validation details in V2 API,
interaction, and command results.
- Forward those diagnostics through V2 controllers and preserve unknown
service errors.
- Use additive, defaulted diagnostic fields and preserve V1 behavior.

Fixes
[AB#3784695](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_workitems/edit/3784695)

## Dependencies

Consumed by the paired MSAL unified-errors PR:
AzureAD/microsoft-authentication-library-for-android#2618.
Authorize-request scopes/claims changes are intentionally excluded.

## Validation

Errors-only snapshot: **651 selected unit tests passed** (215 MSAL, 346
Common4j, 90 Common Android), with zero failures, errors, or skips in
the final XML reports.
The gate includes diagnostic parsing/forwarding and standalone V1
regression coverage.
Final integrated-stack PR2601 validation: **20 live signup/reset E2E
tests and 4 recorder tests passed**, with 3 known duplicate-account
service-test skips. One Mail.tm `/accounts` HTTP 429 attempt passed on
the existing automatic retry; no assertions or retry configuration were
changed.
Live validation was executed against the final stacked errors plus
scopes/claims sources, not the standalone errors snapshot.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 0bcd671b-73fa-4ee6-bcd6-65d7eea4d753
Copilot-Session: 55791345-e680-4927-a364-f6de503184be
Copilot-Session: 495388ac-9812-45ec-9120-b110dcbe5903
@djanardhan98 Disha Janardhan (djanardhan98) added the changelog:none No changelog entry or version increment is required. label Oct 19, 2026
Preserve authorize scopes and claims while adopting the current unified-error diagnostics.

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

Copilot-Session: eafe5634-2142-4235-a7dc-d26bc1baa0d5
Disha Janardhan (djanardhan98) added a commit to AzureAD/microsoft-authentication-library-for-android that referenced this pull request Oct 21, 2026
## Summary

Port Android Native Auth V2 authorize-request inputs and related OTP
parity from AzureAD/microsoft-authentication-library-for-js#8898.

- Accept optional scopes and typed claims for sign-up and password
reset, and propagate inputs for all three V2 entry points.
- Snapshot callback inputs and preserve existing cancellation, callback
delivery, and password clearing.
- Preserve entry scopes when continuation scopes are absent; allow
explicitly empty continuation scopes to select default OIDC scopes.
- Submit empty/short first-factor and MFA OTPs to the service for
validation rather than reject them locally.
- Preserve Native Auth V1 behavior and existing password-to-email
fallback.

**Approved wire policy:** send scopes and optional claims on the initial
authorize-challenge; send scopes but no claims on token exchange.
Intermediate requests send neither. This intentionally follows JS
behavior rather than the work item's literal entry-only scope wording.

Fixes
[AB#3784690](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_workitems/edit/3784690)

## Dependencies

Stacked on the separate MSAL unified-errors PR:
#2618. Its base is
the errors branch so this diff contains only the scopes/claims
workstream.
Requires the paired Common authorize-inputs PR:
AzureAD/microsoft-authentication-library-common-for-android#3308.
The Common gitlink points to `b41473a29fd7e519108b0630526e652996e38f9f`.
Merge the errors dependencies first, then retarget this PR to `dev`.

## Validation

Scopes/claims snapshot: **661 selected unit tests passed** (218 MSAL,
349 Common4j, 94 Common Android), with zero failures, errors, or skips
in the final XML reports.
Coverage includes all three initial entries, callback input snapshots,
continuation scope retention/override, canonical OIDC defaults on entry
and token requests, empty/short OTP service submission, and standalone
V1 regressions.
Final integrated-stack PR2601 validation: **20 live signup/reset E2E
tests and 4 recorder tests passed**, with 3 known duplicate-account
service-test skips. One Mail.tm `/accounts` HTTP 429 attempt passed on
the existing automatic retry; no assertions or retry configuration were
changed.

The live fixture overlay comes from
#2601 and is not
included in this feature PR.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 0bcd671b-73fa-4ee6-bcd6-65d7eea4d753
Copilot-Session: 55791345-e680-4927-a364-f6de503184be
Copilot-Session: 495388ac-9812-45ec-9120-b110dcbe5903
Copilot-Session: eafe5634-2142-4235-a7dc-d26bc1baa0d5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog:none No changelog entry or version increment is required.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants