Android Broker fails to refresh silently due to incorrect UID
trwalke opened this issue · 1 comments
Which Version of ADAL are you using ?
latest (5.2.5)
Which platform has the issue?
xamarin android
What authentication flow has the issue?
- Desktop / Mobile
- Interactive
- Silent
- Integrated Windows Auth
- Username Password
- Device code flow (browserless)
- Web App
- Authorization code
- OBO
- Web API
- OBO
Repro
Make an interactive call using broker on android for one resource and then try to acquire a token silently for a different resource.
Expected behavior
Broker should be able to successfully refresh the token
Actual behavior
The app is forced to sign in interactively again and broker throws the following error
"Could not locate a cache for this app"
Possible Solution
We need to send the UID instead of the PID that we send today because the UID will not change for the user on the device. The broker uses the UID to cache responses so if the UID changes for any reason the cache lookup will fail.
Fixed in ADAL 5.2.6 (https://github.com/AzureAD/azure-activedirectory-library-for-dotnet/releases/tag/5.2.6)