Repository navigation
Support Native Auth V2 SMS and email JIT enrollment in prototype sample - #63
Merged
Silviu Petrescu (spetrescu84) merged 7 commits intoOct 28, 2026
Conversation
Collect explicit email/SMS contacts, route enrollment activation successors, preserve retry states, and migrate prototype unified-error call sites. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2d80cc03-5b60-4a9b-a8e7-002370b86465
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2d80cc03-5b60-4a9b-a8e7-002370b86465
This was referenced Oct 19, 2026
Forward optional claims for sign-in, sign-up, and password reset. Request c4 from both email authentication screens and password reset, add claims regression coverage, and retain the current sample authentication configuration. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 082bda23-63e7-4de3-a519-20d880daef90
Disha Janardhan (djanardhan98)
changed the base branch from
djanardhan/sspr-v2-prototype
to
spetrescu/sample-app-v2
October 23, 2026 17:01
Resolve overlap with spetrescu/sample-app-v2 by keeping its shared ViewModel and removing the superseded fragment routing. Retain c4 claims and configuration, explicit V2 registration contacts, unsupported JIT-resend handling, and continuation-state retention. Preserve existing scopes and stale-flow guards with regression coverage. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 082bda23-63e7-4de3-a519-20d880daef90
Disha Janardhan (djanardhan98)
marked this pull request as ready for review
October 23, 2026 19:13
Disha Janardhan (djanardhan98)
added a commit
to AzureAD/microsoft-authentication-library-common-for-android
that referenced
this pull request
Oct 27, 2026
) ## Summary Add Android Native Auth V2 SMS/email JIT enrollment and activation. - Parse server-offered enrollment methods and explicit activation actions. - Send channel-specific enrollment payloads and follow the exact server links with the latest continuation token. - Preserve sign-in, sign-up, and password-reset continuation context, including original sign-up attributes and reset password-update stage. - Require explicit nonblank contacts, bound automatic SMS risk verification to one hop, and preserve service-owned OTP validation. - Support JIT OTP resend through the existing resend command/transport, preserving the refreshed activation or registration result and originating flow context. - Preserve typed attribute-validation and existing-account outcomes when retained sign-up attributes are automatically submitted after email verification. Rejected attributes retain diagnostics and the current retry state. - Keep contacts, OTPs, tokens, and URLs out of new log representations. - Preserve Native Auth V1 behavior; no new capability requirement is added. ## Cross-platform scope and activation metadata Enrollment/activation follows the flow in AzureAD/microsoft-authentication-library-for-objc#3128. JIT OTP resend is an intentional addition inspired by AzureAD/microsoft-authentication-library-for-js#8927; the referenced iOS implementation does not expose JIT resend. Android requires a positive integer activation code length and substitutes `""` for an absent hint. Unlike the referenced JS implementation, Android accepts activation without a resend link; calling resend in that state fails explicitly without an HTTP request. Sign-up/password-reset completion still requires explicit sign-in; this PR does not add JS-style automatic token completion. ## Dependencies and merge order This PR targets `dev`. Merge it before the paired MSAL PR, which pins the Common implementation explicitly. Companion changes: - MSAL: AzureAD/microsoft-authentication-library-for-android#2623, branch `djanardhan/native-auth-v2-jit-enrollment`. - Sample: Azure-Samples/ms-identity-ciam-native-auth-android-sample#63, fork branch `djanardhan98:djanardhan/native-auth-v2-jit-enrollment`. ## Validation - Latest paired review-fix validation: 38 Common tests passed across `NativeAuthV2SignUpFlowControllerTest`, `NativeAuthV2SignUpEnrollmentResumeTest`, and `NativeAuthV2JitResendTest`; 105 paired MSAL sign-in/sign-up tests passed. - New chained regressions cover enrollment -> activation -> email verification -> retained attribute submission -> typed rejection, including preserved diagnostics, retry using the current attributes token/link, and corrected submission without resubmitting the original email. Existing-account classification is also covered. - Earlier validation recorded 623 common4j native-auth tests and 108 Common V2 tests passing; those broader selections were not rerun for this review fix. - Coverage includes enrollment payloads/HAL contracts, unsupported methods, contact validation, current-token/link use, bounded risk verification, serialization, original-flow continuation, reset-stage gating, and interrupted sign-up resumption. - Full V1 mock-service suites could not run without the existing mock service. Focused passing tests are not a claim of complete live/V1 coverage. [AB#3797291](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_workitems/edit/3797291) --------- 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: 2d80cc03-5b60-4a9b-a8e7-002370b86465 Copilot-Session: 8c889a16-3eb2-4b89-a3b5-0e18a4f28f63 Copilot-Session: f7aefb0c-6e6d-45b0-bbb2-8d819c2e6ef9 Copilot-Session: e11f4730-f731-417d-a0ad-19367f39090c
Enable the existing Resend action for strong-auth verification and forward it to the SDK while retaining refreshed continuation state and stale-flow guards. Update regressions for resend availability, SDK errors and refreshed contact/state handling. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 082bda23-63e7-4de3-a519-20d880daef90
Match the compact MFA dialog layout for shared sign-in, sign-up and password-reset code entry. Wrap the dialog content, remove the Cancel bottom anchor and preserve bottom padding. Add rendered-layout coverage for ordinary and MFA/JIT code screens at two viewport heights. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 082bda23-63e7-4de3-a519-20d880daef90
Disha Janardhan (djanardhan98)
added a commit
to AzureAD/microsoft-authentication-library-for-android
that referenced
this pull request
Oct 27, 2026
…2629) ## Summary Implement the existing Native Auth V2 strong-auth registration and verification states for SMS/email JIT enrollment. - Wire explicit method/contact enrollment and OTP activation through Common commands. - Surface registration from each affected entry and continuation operation. - Resume the originating sign-in, sign-up, or password-reset flow after activation. - Preserve offered methods, channel, and opaque continuation through parceling; retain existing callback/cancellation and typed-error conventions. - Support callback and coroutine `resendChallenge()` for JIT OTP resend. Use the returned state for subsequent operations, including refreshed method selection when the service returns registration instead of activation. - Preserve typed attribute-validation and existing-account errors when sign-up resumes retained attribute submission after email verification, including diagnostics and the corrected-attribute retry state. - Keep OTP validation service-side and pin the paired Common implementation. ## Cross-platform scope and activation metadata Enrollment/activation follows the flow in AzureAD/microsoft-authentication-library-for-objc#3128. JIT OTP resend is an intentional addition inspired by AzureAD/microsoft-authentication-library-for-js#8927; the referenced iOS implementation does not expose JIT resend. Android requires a positive integer activation code length and substitutes `""` for an absent hint. Unlike the referenced JS implementation, Android accepts activation without a resend link; calling resend in that state fails explicitly without an HTTP request. Every successful transition uses the current service links and continuation token. Sign-up/password-reset completion still requires explicit sign-in; this PR does not add JS-style automatic token completion. ## Dependencies and merge order This PR targets `dev`. Merge the paired Common JIT changes before this PR. Common dependency: AzureAD/microsoft-authentication-library-common-for-android#3315, branch `djanardhan/native-auth-v2-jit-enrollment`, commit `9bdaa78729f48dd7229127bacabc0dd2ea9619d5`. Sample companion: Azure-Samples/ms-identity-ciam-native-auth-android-sample#63, fork branch `djanardhan98:djanardhan/native-auth-v2-jit-enrollment`. ## Validation - Latest paired review-fix validation: 105 MSAL tests passed in `NativeAuthV2SignInTest` and `NativeAuthV2SignUpTest`; 38 Common tests passed across sign-up controller, enrollment resumption, and JIT resend suites. - New regressions cover resend-to-registration for sign-in/sign-up/password-reset, refreshed method selection, retained-attribute rejection/retry, and existing-account classification with preserved service diagnostics. - Earlier validation recorded 166 MSAL V2 tests and a combined selection of 205 passes/4 existing skips, plus a sample build. Those were earlier revisions, not a claim that the sample or those wider selections were rerun at this head. - Wider V1 flow suites require the existing unavailable mock API service. The existing shared configuration/runtime rehydration limitation after process death is unchanged; this PR does not claim independently executable restored states without runtime rehydration. [AB#3797292](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_workitems/edit/3797292) --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0bcd671b-73fa-4ee6-bcd6-65d7eea4d753 Copilot-Session: 2d80cc03-5b60-4a9b-a8e7-002370b86465 Copilot-Session: 8c889a16-3eb2-4b89-a3b5-0e18a4f28f63 Copilot-Session: f7aefb0c-6e6d-45b0-bbb2-8d819c2e6ef9 Copilot-Session: e11f4730-f731-417d-a0ad-19367f39090c
Route existing-account code and password results through the existing sign-in screens, retain continuation states for submit and resend, and cover retries and stale results. Remove the tenant-specific custom API scope while preserving authentication-context claims. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 082bda23-63e7-4de3-a519-20d880daef90
Silviu Petrescu (spetrescu84)
approved these changes
Oct 28, 2026
Silviu Petrescu (spetrescu84)
merged commit Oct 28, 2026
2fb6837
into
Azure-Samples:spetrescu/sample-app-v2
1 check passed
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
Update the SSPR V2 prototype to exercise Android Native Auth V2 SMS/email JIT
enrollment and activation.
password collection rather than assuming activation completes sign-in.
already required by the SDK stack.
Dependencies
Base:
djanardhan/sspr-v2-prototype.This is a prototype-only stacked draft, not a release dependency update.
It requires the feature branch
djanardhan/native-auth-v2-jit-enrollmentin both:(Common commit
1b7310fed19efe365737e4004463935b2bc62698).(MSAL implementation
30b412179, with the paired Common gitlink).These build on
AzureAD/microsoft-authentication-library-common-for-android#3308 and
AzureAD/microsoft-authentication-library-for-android#2619.
Do not test this against an unrelated released Maven artifact.
Build and manual testing
Use the integrated
android-completebuild with these feature checkouts.If they occupy the normal
commonandmsaldirectories, run from that root:For separate worktrees, use a local uncommitted init script mapping root projects
:common,:common4j,:testutils,:keyvault,:labapi,:uiautomationutilities, and:LabApiUtilitiesto the paired Common checkout,and
:msalto the paired MSAL checkout'smsaldirectory.Keep feed credentials and machine-specific paths outside source control.
Manual device checks:
different from the username; confirm delivery targets the explicit contact.
continuation into new-password entry or explicit sign-in-after-reset.
report completion.
The service/tenant must actually request enrollment and the desired successors.
No live backend or device validation is claimed by this PR.