microsoft-authentication-library-for-android
microsoft-authentication-library-for-android copied to clipboard
MSFT apps do not get SDM state updates
- Device: Any Android device (Tested in Samsung device and AVD)
- Android Version: 12
- Browser : Edge
- MSAL Version: Our app is using MSAL v4.6.3 (But issue is also seen in Playstore downloaded MSFT Teams, Outlook and Edge and Sample app as well)
To Reproduce Issue: Apps using MSAL lib and also MSFT apps (Teams, Outlook and Edge) do not get SDM (Shared Device Mode) state updates (SDM enabled/disabled updates) i.e when app creates a IPublicClientApplication instance then isSharedDevice call does not return correct SDM state in some cases (as mentioned below).
Steps to reproduce the behavior: Step 1) Install and launch MSAL Sample app Step 2) check the Device Mode: Shared/Non-Shared Step 3) Install Ms Authenticator app and place it in SDM state. (or vice versa if Ms Authenticator app is already installed and in SDM state then uninstall it to change the SDM state) Step 4) Switch to the already launched Sample app and check SDM state (Incorrect state will be displayed), The app never gets SDM updates only after recreating the app it gets correct state.
Expected behavior App should get correct SDM state update when SDM state changes
Actual Behavior App does not get correct SDM state update when SDM state changes, App needs to be killed and relaunched or in some cases it's data/storage cleared to correct its SDM state. Until then the app (app using MSAL or MSFT apps like Teams, Outlook and Edge) behaviour is non-deterministic: i.e : Global Sign-out is not honoured (account is active in the app even on sign-out) , some MSFT apps allow adding multiple accounts even though Ms Authenticator app is in SDM enabled state.