You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/active-directory/develop/msal-android-single-sign-on.md
+15-12Lines changed: 15 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,6 @@ ms.devlang: java
13
13
ms.topic: how-to
14
14
ms.date: 10/15/2020
15
15
ms.author: henrymbugua
16
-
ms.reviewer: marsma
17
16
---
18
17
19
18
# Enable cross-app SSO on Android using MSAL
@@ -28,8 +27,8 @@ In this how-to, you'll learn how to configure the SDKs used by your application
28
27
29
28
This how-to assumes you know how to:
30
29
31
-
- Provision your app using the Azure portal. For more information on this topic, see the instructions for creating an app in [the Android tutorial](./tutorial-v2-android.md#create-a-project)
32
-
- Integrate your application with the [Microsoft Authentication Library for Android](https://github.com/AzureAD/microsoft-authentication-library-for-android).
30
+
- Provision your app using the Azure portal. For more information about app provision, see the instructions for creating an app in [the Android tutorial](./tutorial-v2-android.md#create-a-project)
31
+
- Integrate your application with the [MSAL for Android](https://github.com/AzureAD/microsoft-authentication-library-for-android)
33
32
34
33
## Methods for single sign-on
35
34
@@ -39,13 +38,13 @@ There are two ways for applications using MSAL for Android to achieve SSO:
39
38
* Through the [system browser](#sso-through-system-browser)
40
39
41
40
42
-
It is recommended to use a broker application for benefits like device-wide SSO, account management, and conditional access. However, it requires your users to download additional applications.
41
+
It's recommended to use a broker application for benefits like device-wide SSO, account management, and conditional access. However, it requires your users to download additional applications.
43
42
44
43
## SSO through brokered authentication
45
44
46
-
We recommend that you use one of Microsoft's authentication brokers to participate in device-wide single sign-on (SSO) and to meet organizational Conditional Access policies. Integrating with a broker provides the following benefits:
45
+
We recommend that you use one of Microsoft's authentication brokers to participate in device-wide SSO and to meet organizational Conditional Access policies. Integrating with a broker provides the following benefits:
47
46
48
-
- Device single sign-on
47
+
- Device SSO
49
48
- Conditional Access for:
50
49
- Intune App Protection
51
50
- Device Registration (Workplace Join)
@@ -74,7 +73,7 @@ If a device doesn't already have a broker app installed, MSAL instructs the user
74
73
75
74
#### When a broker is installed
76
75
77
-
When a broker is installed on a device, all subsequent interactive token requests (calls to `acquireToken()`) are handled by the broker rather than locally by MSAL. Any SSO state previously available to MSAL is not available to the broker. As a result, the user will need to authenticate again, or select an account from the existing list of accounts known to the device.
76
+
When a broker is installed on a device, all subsequent interactive token requests (calls to `acquireToken()`) are handled by the broker rather than locally by MSAL. Any SSO state previously available to MSAL isn't available to the broker. As a result, the user will need to authenticate again, or select an account from the existing list of accounts known to the device.
78
77
79
78
Installing a broker doesn't require the user to sign in again. Only when the user needs to resolve an `MsalUiRequiredException` will the next request go to the broker. `MsalUiRequiredException` can be thrown for several reasons, and needs to be resolved interactively. For example:
80
79
@@ -86,7 +85,7 @@ Installing a broker doesn't require the user to sign in again. Only when the use
86
85
87
86
#### When a broker is uninstalled
88
87
89
-
If there is only one broker hosting app installed, and it is removed, then the user will need to sign in again. Uninstalling the active broker removes the account and associated tokens from the device.
88
+
If there's only one broker hosting app installed, and it's removed, then the user will need to sign in again. Uninstalling the active broker removes the account and associated tokens from the device.
90
89
91
90
If Intune Company Portal is installed and is operating as the active broker, and Microsoft Authenticator is also installed, then if the Intune Company Portal (active broker) is uninstalled the user will need to sign in again. Once they sign in again, the Microsoft Authenticator app becomes the active broker.
Once you've generated a signature hash with *keytool*, use the Azure portal to generate the redirect URI:
116
115
117
-
1. Sign in to the <ahref="https://portal.azure.com/"target="_blank">Azure portal</a> and select your Android app in **App registrations**.
118
-
1. Select **Authentication** > **Add a platform** > **Android**.
116
+
1. Sign in to the <ahref="https://portal.azure.com/"target="_blank">Azure portal</a>.
117
+
1. If you have access to multiple tenants, use the **Directories + subscriptions** filter :::image type="icon" source="/azure/active-directory/develop/media/common/portal-directory-subscription-filter.png" border="false"::: in the top menu to switch to the tenant in which you registered your application.
118
+
1. Search for and select **Azure Active Directory**.
119
+
1. Under **Manage**, select **App registrations**.
120
+
1. In **App registrations**, select your application.
121
+
1. Under **Manage**, select **Authentication** > **Add a platform** > **Android**.
119
122
1. In the **Configure your Android app** pane that opens, enter the **Signature hash** that you generated earlier and a **Package name**.
120
123
1. Select the **Configure** button.
121
124
@@ -157,7 +160,7 @@ You can remove the account from settings if you want to repeat the test.
157
160
158
161
## SSO through system browser
159
162
160
-
Android applications have the option to use the WebView, system browser, or Chrome Custom Tabs for authentication user experience. If the application is not using brokered authentication, it will need to use the system browser rather than the native webview in order to achieve SSO.
163
+
Android applications have the option to use the WebView, system browser, or Chrome Custom Tabs for authentication user experience. If the application isn't using brokered authentication, it will need to use the system browser rather than the native webview in order to achieve SSO.
161
164
162
165
### Authorization agents
163
166
@@ -173,7 +176,7 @@ By default, applications integrated with MSAL use the system browser's Custom Ta
173
176
174
177
If the application uses a `WebView` strategy without integrating Microsoft Authenticator or Company Portal support into their app, users won't have a single sign-on experience across the device or between native apps and web apps.
175
178
176
-
If the application uses MSAL with a broker like Microsoft Authenticator or Intune Company Portal, then users can have a SSO experience across applications if the they have an active sign-in with one of the apps.
179
+
If the application uses MSAL with a broker like Microsoft Authenticator or Intune Company Portal, then users can have a SSO experience across applications if they have an active sign-in with one of the apps.
0 commit comments