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: support/entra/entra-id/app-integration/repeat-login prompts-in-msal-ios-app.md
+11-10Lines changed: 11 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,35 +13,36 @@ This article provides guidance for troubleshooting repeated login prompts in an
13
13
14
14
## Symptoms
15
15
16
-
You implements mobile authentication in your iOS app using the Microsoft Authentication Library (MSAL) SDK, following the [official tutorial](/azure/active-directory/develop/tutorial-v2-ios). The user is unexpectedly prompted to log in multiple times after the initial login.
16
+
You integrate mobile authentication in your iOS app by using the Microsoft Authentication Library (MSAL) SDK. This is done by following the [official tutorial](/azure/active-directory/develop/tutorial-v2-ios). The user is unexpectedly prompted to log in multiple times after the initial login.
17
17
18
18
## Cause
19
19
20
-
This MSAL SDK library facilitates authentication by renewing tokens automatically, enabling single sign-on (SSO) between other apps on the device, and managing user accounts. For SSO to function correctly, tokens need to be shared between apps, which requires a token cache or a broker application like Microsoft Authenticator for iOS.
20
+
This issue is typically caused by web browser configurations that do not allow cookie sharing.
21
21
22
-
This issue is often caused by web browser configurations that do not allow cookie sharing. Interactive authentication in MSAL requires a web browser. On iOS, MSAL uses the system web browser by default for interactive authentication. This default setup supports SSO state sharing between applications and web apps.
22
+
The tutorial uses the MSAL to implement authentication. MSAL SDK library facilitates authentication by renewing tokens automatically. It also enables single sign-on (SSO) between other apps on the device and manages user accounts.
23
23
24
-
However, if you customize the browser configuration for authentication, such as redirecting to one of the following options, cookie sharing might not be enabled:
24
+
For SSO to function correctly, tokens must be shared between apps. This requires a token cache or a broker application, such as Microsoft Authenticator for iOS. Interactive authentication in MSAL requires a web browser. On iOS, MSAL uses the system web browser by default for interactive authentication. This default setup supports SSO state sharing between the apps.
25
+
26
+
However, if you customize the browser configuration for authentication, such as by using one of the following options, cookie sharing might not be enabled by default:
Customizing the browser is acceptable, but it must be configured to allow cookie sharing to prevent repeated login prompts.
32
+
To customize the browser, you must allow cookie sharing to prevent repeated login prompts.
31
33
32
34
## Resolution
33
35
34
-
To enable cookie sharing and resolve this issue, use one of the following configurations:
36
+
To enable cookie sharing and prevent repeated login prompts, use one of the following configurations:
35
37
36
38
-**ASWebAuthenticationSession in MSAL** + **openURL in Safari browser** (the full Safari browser, not SafariViewController).
37
39
-**SFSafariViewController in MSAL** + **SFSafariViewController in your app**.
38
40
-**WKWebView in MSAL** + **WKWebView in your app**.
39
41
40
-
Refer to [customizing webviews](https://docs.microsoft.com/en-us/azure/active-directory/develop/customize-webviews) for additional guidance on configuring webviews and browsers.
41
-
42
-
### Note for Xamarin.iOS users
42
+
For more information, see [Customizing webviews and browsers](/azure/active-directory/develop/customize-webviews).
43
43
44
-
If you are implementing MSAL in Xamarin.iOS, additional considerations are required for token caching and using the Microsoft Authenticator app. These considerations are separate from the cookie-sharing issue discussed here. For detailed instructions, refer to [Xamarin.iOS MSAL considerations](https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-net-xamarin-ios-considerations).
44
+
> [!Note]
45
+
> For Xamarin.iOS, several additional factors need to be considered, including enabling token caching and using Microsoft Authenticator. For more information, see [Xamarin.iOS MSAL considerations](/azure/active-directory/develop/msal-net-xamarin-ios-considerations).
45
46
46
47
[!INCLUDE [Azure Help Support](../../../includes/azure-help-support.md)]
0 commit comments