-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
isQrPinAvailable API #1931
isQrPinAvailable API #1931
Conversation
Logger.info(methodTag, "is QR + PIN available? " + commandResult.getResult()); | ||
return (Boolean) commandResult.getResult(); | ||
case ERROR: | ||
Logger.error(methodTag, "Unexpected error on isQRPinAvailable", (Throwable) commandResult.getResult()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is throwing me off :/
We should be using something similar to kotlin's Result class instead. (separate method for result and exception).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll address this as a separate PR, I would like to keep it simple, and this change will affect other thing no related to QR+PIN.
## Why? To determine if QR + PIN authorization is available for MDM devices, Teams app will call this API. if the result is true: Teams will show a button to login using QR + PIN, if the result is false: Teams will not show this button. ## How does this API works? The QR + PIN feature will be configured by the administrator through app configuration policies for managed Android Enterprise devices. https://learn.microsoft.com/en-us/mem/intune/apps/app-configuration-policies-use-android Where the administrator can enable/disable this type of authorization for all managed devices, by seating this key "isQrPinAvailable" to true in the Authenticator app. On Android we have 3 apps which can be the broker, Authenticator, CP (Company Portal) and LTW (Link to Windows). which makes things extremely complex. To keep the configuration simple for the tenant's administrator, we propose to use the managed configurations of the Authenticator app to read/set the admin flag. Meaning that authenticator app must be installed on Android devices to use the QR + PIN feature. ![qrpinapi drawio2](https://github.com/AzureAD/microsoft-authentication-library-common-for-android/assets/76129899/fdc414af-b66b-40b8-a03b-a256d0d614ad) [Client design doc](https://microsoft-my.sharepoint-df.com/:w:/p/mipetriu/EWbcvu99HRxEgy-BC9jilKoBnqIr3yCJaNPZMlGSG5c3ow?e=aP0ey1) ## Changes - Add constants for API - Add BaseCommand for isQrPinAvailable, used by BrokerMsal API - Add behavior for LocalMsalController (not supported) BrokerMsalController and (supported, call the broker) ## Related PR AzureAD/ad-accounts-for-android#2587 AzureAD/microsoft-authentication-library-for-android#1931
Why?
To determine if QR + PIN authorization is available for MDM devices, Teams app will call this API.
if the result is true: Teams will show a button to login using QR + PIN,
if the result is false: Teams will not show this button.
How does this API works?
The QR + PIN feature will be configured by the administrator through app configuration policies for managed Android Enterprise devices. https://learn.microsoft.com/en-us/mem/intune/apps/app-configuration-policies-use-android
Where the administrator can enable/disable this type of authorization for all managed devices, by seating this key "isQrPinAvailable" to true in the Authenticator app.
On Android we have 3 apps which can be the broker, Authenticator, CP (Company Portal) and LTW (Link to Windows). which makes things extremely complex.
To keep the configuration simple for the tenant's administrator, we propose to use the managed configurations of the Authenticator app to read/set the admin flag. Meaning that authenticator app must be installed on Android devices to use the QR + PIN feature.
Client design doc
Changes
Related PR
https://github.com/AzureAD/ad-accounts-for-android/pull/2587
AzureAD/microsoft-authentication-library-common-for-android#2219