Facing issues with refresh access_token using MSAL in an Android application

Mathur, Anchit 0 Reputation points
2024-09-11T08:46:15.04+00:00

I'm trying to integrate an Android application with Azure AD B2C using the MSAL library https://github.com/AzureAD/microsoft-authentication-library-for-android.

I have started by creating a sample application to test it by using the sample project: https://github.com/Azure-Samples/ms-identity-android-kotlin

After running the application, I get the access token, but I am unable to do a silent refresh.

In Logcat I find this warning, from which I figure it could be due to some caching issue:

We had a home account id that could not be split correctly, We expected it to split into 2 parts but instead we had 4 when splitting the string on dot ('.')

The home account id looks like this: test.user@example.com-b2c_1a_signin.123abc0000-1234-1000-1000-abcdef12345

Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,892 questions
{count} votes

Your answer

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