I'm trying to support B2B access in my Android App
I got an issue when to get a token (silently) for the external tenant and the user has Microsoft Authenticator installed
The user is already signed-in to his home tenant and I manage to aquire token to the home tenant (refresh token is null)
here is the code i am using to get the token
val authenticationContext = authenticationContextProvider!!.create(
activity,
azureActiveDirectoryConfiguration.url.replace("common", tenantId),
azureActiveDirectoryConfiguration.shouldValidateAuthority())
and later
authenticationContext.acquireTokenSilentAsync(
resourceId,
clientId,
userInfo.userId,
object : AuthenticationCallback<AuthenticationResult> {
...
})
userInfo is what I got in the result of the regular home tenant token acquiring
this is the error I get:
com.microsoft.aad.adal.AuthenticationException: Received error from broker, errorCode: Refresh token is failed and prompt is not allowed; ErrorDescription: Request authority:[MyAuthority]/[TenantId] resource:[MyResource] clientid:[MyClientId]