Skip to content

Conversation

nilo-ms
Copy link
Contributor

@nilo-ms nilo-ms commented Sep 25, 2025

This PR adds a new SDK error with instructions when the auth method is blocked during MFA flow.

MSAL Common PR: AzureAD/microsoft-authentication-library-common-for-android#2772

Fixes AB#3313635

Copy link
Contributor

@Copilot 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 support for handling blocked authentication methods during MFA flows by introducing a new SDK error type AUTH_METHOD_BLOCKED with appropriate error handling and utility methods.

  • Adds new error type AUTH_METHOD_BLOCKED with documentation explaining when it occurs
  • Handles BlockedAuthMethod command results in both AwaitingMFAState and MFARequiredState
  • Provides utility method isAuthMethodBlocked() for easier error type checking

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
msal/src/main/java/com/microsoft/identity/nativeauth/statemachine/states/MFAStates.kt Adds handling for BlockedAuthMethod results in MFA state machines and updates documentation
msal/src/main/java/com/microsoft/identity/nativeauth/statemachine/errors/MFAErrors.kt Adds utility method to check if auth method is blocked
msal/src/main/java/com/microsoft/identity/nativeauth/statemachine/errors/Error.kt Defines new AUTH_METHOD_BLOCKED error type constant
common Updates submodule reference to include related changes

@github-actions github-actions bot added the msal label Sep 25, 2025
@github-actions github-actions bot changed the title Native auth: add new SDK error when auth method is blocked Native auth: add new SDK error when auth method is blocked, Fixes AB#3313635 Sep 25, 2025
@nilo-ms nilo-ms added the No-Changelog This change does not update the changelog. label Sep 25, 2025
nilo-ms added a commit to AzureAD/microsoft-authentication-library-common-for-android that referenced this pull request Sep 26, 2025
…3313635 (#2772)

This PR adds a new SDK error with instructions when the auth method is
blocked during MFA flow.

MSAL PR:
AzureAD/microsoft-authentication-library-for-android#2384

Fixes
[AB#3313635](https://identitydivision.visualstudio.com/Engineering/_workitems/edit/3313635)
@nilo-ms nilo-ms merged commit 50deebc into dev Sep 26, 2025
13 of 14 checks passed
@nilo-ms nilo-ms deleted the danilo/add-block-auth-method-res branch September 26, 2025 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

msal native-auth No-Changelog This change does not update the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants