A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
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.
Recommended architecture
- Keep MSAL as the authority for Microsoft authentication.
- 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^
- 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.
- 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
- Authenticate users with MSAL.NET
- Get a token from the token cache using MSAL.NET
- Implement Restore Credentials with Credential Manager | Identity | Android Developers
- Token cache serialization
- Enable cross-app SSO on Android using MSAL
- About Restore Credentials | Identity | Android Developers
- Secure storage
- AEP guideline: Restore Credentials | Apps Experience Program | Android Developers
- Device authentication errors