Is Android Restore Credentials required for an .Net app using Microsoft MSAL?

Khushal Mistry 0 Reputation points
2026-11-23T05:18:15.87+00:00

Our .NET MAUI Android app uses Microsoft MSAL with Entra ID authentication. On startup, we call AcquireTokenSilent() and fall back to AcquireTokenInteractive() when required. Microsoft handles SSO, MFA, and Conditional Access.

Google Play’s Zero-Tap Sign-In requirement says apps supporting login must restore the user’s sign-in state during device migration using the Android Restore Credentials API.

Does an app using MSAL still need to implement Restore Credentials separately? If yes:

  • Can it integrate directly with MSAL?
  • Must we add WebAuthn backend endpoints?
  • Should it restore only our application session, followed by MSAL authentication when a Microsoft token or MFA is required?
  • Are enterprise apps requiring MFA on a new device exempt?

Note: our app is highly dependent on MSAL authentication.

Developer technologies | .NET | .NET Multi-platform App UI
0 comments No comments

2 answers

Sort by: Most helpful
  1. Gatlin Le (WICLOUD CORPORATION) 1,595 Reputation points Microsoft External Staff Moderator
    2026-11-23T07:15:13.88+00:00

    Hi @Khushal Mistry ,

    I understand why this is unclear, especially because your app already relies on MSAL for sign-in, SSO, MFA, and Conditional Access. Based on the available documentation, Android Restore Credentials and Microsoft Entra authentication through MSAL should be treated as separate mechanisms.

    If your app is subject to Google's Restore Credentials requirement, using MSAL.NET does not appear to satisfy that requirement by itself. Microsoft documents that token caching is already configured for mobile apps, but it does not document an API that connects the MSAL.NET mobile token cache to Android Restore Credentials or transfers that cache to another device. The existing MSAL behavior is described in Token cache serialization and Using MSAL.NET with .NET MAUI.

    MSAL itself does not require your mobile app to implement WebAuthn endpoints. Any backend operations required to issue and redeem a restore credential belong to Google's Restore Credentials design and your application's account architecture, rather than to MSAL.NET. For that part of the implementation, Google's About Restore Credentials and Implement Restore Credentials with Credential Manager documentation describe the Restore Credentials flow and implementation.

    If you implement Restore Credentials, restoring application-level account context or a limited application session and then continuing through MSAL when a Microsoft Entra token is required would preserve the security boundary between the two mechanisms. The restored state should not be treated as an Entra access token or refresh token, nor as proof that MFA, Conditional Access, device registration, or device compliance has already been satisfied.

    When the app needs an Entra-protected resource, continue to call AcquireTokenSilent() first, as described in Get a token from the token cache using MSAL.NET. If MSAL returns MsalUiRequiredException, an interactive flow may be required for sign-in, consent, MFA, or another policy requirement, as explained in Understanding MsalUiRequiredException.

    Requiring MFA on a new device does not, based on Microsoft documentation, establish an exemption from Google's requirement. Microsoft documents how MSAL handles MFA, Conditional Access, and device authentication, but Google determines whether an app is in scope for Restore Credentials and whether an exemption applies. That part should be checked against Google's current Restore Credentials requirement in the Apps Experience Program.

    On the Microsoft Entra side, the new device may still need to complete MFA, registration, management, or compliance requirements. When Conditional Access requires device authentication on Android, Microsoft recommends enabling a broker such as Microsoft Authenticator or Intune Company Portal, as described in Device authentication errors. Broker-based SSO remains part of the MSAL and Microsoft Entra authentication flow; it is not an integration with Android Restore Credentials.

    Therefore, I would use Restore Credentials only for the application-level account or session restoration required by Google, if applicable, and continue using MSAL as the authority for Microsoft Entra token acquisition. This allows the account context to be restored without bypassing MFA, Conditional Access, or other authentication requirements on the new device.

    Disclaimer: Some links are non-Microsoft website. The pages appear to be providing accurate, safe information. Watch out for ads on the site that may advertise products frequently classifies as a PUP (Potentially Unwanted Products). Thoroughly research any product advertised on the site before you decide to download and install it.

    I hope the information above helps make the distinction a little clearer. If anything is still unclear or does not match what you are seeing in your application, please feel free to share the details and I will be happy to take another look.

    If this answer has helped you move forward, you are also welcome to follow the guidance when convenient, as this may help others with a similar question find the information more easily.

    Thank you.

    Was this answer helpful?

    2 people found this answer helpful.

  2. AI answer

    2026-11-23T05:19:42.2466667+00:00

    If your app is subject to Google Play’s Restore Credentials requirement, implement it separately as a backend-mediated restoration of your app’s account or session; it does not integrate directly with MSAL or restore Microsoft Entra tokens.

    1. Keep MSAL as the authority for Microsoft authentication.
      • Continue calling AcquireTokenSilent() first.
      • If no usable account or token exists, catch MsalUiRequiredException and call AcquireTokenInteractive().
      • MSAL handles token acquisition, refresh, SSO, MFA, Conditional Access, and broker integration. This is Microsoft’s recommended MAUI pattern.^1^^2^
    2. After successful authentication on the old device, create a Restore Credential.
      • The Android client requests creation options from your backend.
      • Credential Manager creates a restore key associated with the app/account.
      • Android makes that restore key available during supported device migration or app restoration.^3^
    3. On the new device, redeem the restored key through your backend.
      • The app retrieves the key using Android Credential Manager.
      • It sends the key to your backend.
      • The backend validates the key and maps it to the existing application account.
      • The backend may restore a limited application session or return enough account context to resume the sign-in flow.
    4. Run MSAL whenever Microsoft authorization is required.
      • Try silent acquisition using any account available from MSAL or the broker.
      • If Entra requires interaction, MFA, consent, device registration, or another Conditional Access step, launch interactive authentication.
      • Do not treat the restored application session as an Entra access token.

    A simplified startup decision flow is:

    var restoredSession = await restoreService.TryRestoreSessionAsync();
    
    try
    {
        return await msalService.AcquireTokenSilentAsync();
    }
    catch (MsalUiRequiredException)
    {
        return await msalService.AcquireTokenInteractiveAsync(
            loginHint: restoredSession?.UserName);
    }
    

    A login hint can improve account selection, but it is not proof of identity and must not bypass MSAL or backend authorization.

    Direct answers

    Can Restore Credentials integrate directly with MSAL?

    No documented MSAL.NET API connects its token cache to Android Restore Credentials. Restore Credentials uses Android Credential Manager and your backend, while MSAL manages Microsoft identity tokens and accounts. Mobile cache serialization is already provided for MAUI targets, but Microsoft does not document that cache as transferable to another device.^4^

    Broker support can improve new-device SSO when Microsoft Authenticator or Company Portal already has the account, but that remains an MSAL/broker operation rather than Restore Credentials integration.^5^

    Must the backend add WebAuthn endpoints?

    A backend component is required by the documented Restore Credentials flow, but separate WebAuthn/passkey endpoints are not stated as mandatory. Google notes that Restore Credentials is particularly suitable for applications already supporting passkeys because some server-side concepts can be shared.^6^

    At minimum, the backend needs operations that can:

    • issue creation options after an authenticated session;
    • bind an opaque restore key to an application account;
    • validate or redeem that key;
    • prevent replay and support revocation/rotation;
    • decide whether to restore a session or require Entra authentication.

    Do not place an Entra access token, refresh token, password, or MFA secret in the restore key.

    Should it restore only the application session, followed by MSAL when necessary?

    Yes. Restore the application-level account/session—or an opaque handle from which the backend can provision one—and then invoke MSAL before accessing resources protected by Microsoft Entra.

    This separation is important on a migrated device. Android Auto Backup does not transfer the encryption keys used by MAUI SecureStorage; restored encrypted values can therefore be unreadable and are removed by MAUI.^7^ Copying local MSAL or application token data is not a substitute for the server-mediated restoration protocol.

    Are enterprise apps requiring MFA on a new device exempt?

    MFA or Conditional Access does not, by itself, establish an exemption. Use the exemptions listed in Google’s current Apps Experience Program guideline to determine whether the app is in scope.^8^

    Restore Credentials also does not override Entra policy. If the new device must perform MFA, prove compliance, or register through a broker, MSAL must allow that interaction. Microsoft recommends enabling Microsoft Authenticator or Company Portal as the broker when mobile Conditional Access requires managed-device proof.^9^

    The compliant outcome can therefore be:

    • the app account is recognized automatically after migration;
    • basic application state is restored;
    • the user is then prompted for Entra MFA or device enrollment because enterprise policy requires it.

    References

    1. Authenticate users with MSAL.NET
    2. Get a token from the token cache using MSAL.NET
    3. Implement Restore Credentials with Credential Manager | Identity | Android Developers
    4. Token cache serialization
    5. Enable cross-app SSO on Android using MSAL
    6. About Restore Credentials | Identity | Android Developers
    7. Secure storage
    8. AEP guideline: Restore Credentials | Apps Experience Program | Android Developers
    9. Device authentication errors
    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

    1 person found this answer helpful.

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.