Repository navigation
Add Native Auth V2 authorize scopes and claims, Fixes AB#3784690 - #2619
Closed
Disha Janardhan (djanardhan98) wants to merge 5 commits into
Closed
Disha Janardhan (djanardhan98) wants to merge 5 commits into
Disha Janardhan (djanardhan98) wants to merge 5 commits into
Conversation
Fixes AB#3784690 Thread typed entry claims and scopes through public APIs and adapters, snapshot callback inputs, and retain null-versus-empty continuation semantics. Include JS8898 empty/short OTP service-validation parity. Token retains scope and omits claims; V1 is unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0bcd671b-73fa-4ee6-bcd6-65d7eea4d753
Fixes AB#3784695 Rejected credentials are invalid credentials; empty password input is invalid input. Use independently validated Common diagnostic-forwarding repair. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0bcd671b-73fa-4ee6-bcd6-65d7eea4d753 (cherry picked from commit 7ac5b2d)
Fixes AB#3784690 Use the Common scope-canonicalization fix validated with MSAL/Common focused suites; retain carried unified-error repair and existing scopes/claims wire policy. 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
|
❌ Invalid work item number: AB#3784690 ##. Work item number must be a valid integer. Click here to learn more. |
|
✅ Work item link check complete. Description contains link AB#3784690 to an Azure Boards work item. |
| * Not all scopes are guaranteed to be included in the access token returned. | ||
| * For V2, null retains entry scopes; an explicit empty list requests only default OIDC scopes. | ||
| */ | ||
| var scopes: List<String>? = null |
Contributor
There was a problem hiding this comment.
These actually need to be removed they can't be sent, if used by v2 same class, we need to make another class for v2 specifically, I am not sure if it even has any parameters.
| methodName = "${TAG}.submitCode(code: String)" | ||
| ) | ||
| val state = continuationState ?: return invalidState() | ||
| if (code.isEmpty()) { |
Contributor
There was a problem hiding this comment.
why was this removed in this PR?
| methodName = "${TAG}.submitChallenge(challenge: String)" | ||
| ) | ||
| val state = continuationState ?: return invalidState() | ||
| if (challenge.isEmpty()) { |
Contributor
There was a problem hiding this comment.
why was this removed in this PR?
Resolve the Common submodule conflict with the paired authorize-inputs merge, retaining scopes, claims, and 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-common-for-android
that referenced
this pull request
Oct 20, 2026
) ## 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](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_workitems/edit/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. --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Silviu Petrescu <spetrescu@microsoft.com> Copilot-Session: 0bcd671b-73fa-4ee6-bcd6-65d7eea4d753 Copilot-Session: eafe5634-2142-4235-a7dc-d26bc1baa0d5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Port Android Native Auth V2 authorize-request inputs and related OTP parity from AzureAD/microsoft-authentication-library-for-js#8898.
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
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
/accountsHTTP 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.