Skip to content

Commit 5f68657

Browse files
committed
Merge remote-tracking branch 'upstream/main' into Branch-CI4498
2 parents cae2b26 + 19f7631 commit 5f68657

File tree

3 files changed

+70
-20
lines changed

3 files changed

+70
-20
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: Why does an MSAL-based iOS app keep asking for credentials with Microsoft Entra?
3+
description: Provides guidance for troubleshooting repeated sign-in prompts in an iOS MSAL implementation
4+
ms.date: 03/19/2025
5+
ms.author: daga
6+
ms.service: entra-id
7+
ms.custom: sap:Microsoft Entra App Integration and Development
8+
---
9+
10+
# Troubleshoot sign-in prompt issues in iOS with MSAL SDK
11+
12+
This article provides guidance for troubleshooting repeated sign-in prompts in an iOS app that uses Microsoft Authentication Library (MSAL).
13+
14+
## Symptoms
15+
16+
You [follow this tutorial](/azure/active-directory/develop/tutorial-v2-ios) to integrate Microsoft identity platform authentication in your iOS app by using the Microsoft Authentication Library (MSAL) SDK. However, after the initial login, users are unexpectedly prompted to sign in multiple times.
17+
18+
## Cause
19+
20+
This issue is typically caused by the web browser used by MSAL does not allow cookie sharing.
21+
22+
The tutorial uses the MSAL to implement authentication. MSAL SDK facilitates authentication by automatically renewing tokens. It also enables single sign-on (SSO) between other apps on the device and manages user accounts.
23+
24+
For SSO to function correctly, tokens must be shared between apps. To meet this requirement, you must use 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 Safari system browser by default for interactive authentication. This default setup supports SSO state sharing between 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.
27+
28+
| **For iOS only** | **For iOS and macOS** |
29+
| --- | --- |
30+
| [SFAuthenticationSession](https://developer.apple.com/documentation/safariservices/sfauthenticationsession?language=objc) <br> [SFSafariViewController](https://developer.apple.com/documentation/safariservices/sfsafariviewcontroller?language=objc) | [ASWebAuthenticationSession](https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession?language=objc) <br> [WKWebView](https://developer.apple.com/documentation/webkit/wkwebview?language=objc) |
31+
32+
33+
## Resolution
34+
35+
To prevent repeated login prompts, you must allow cookie sharing when you customize the browser. To enable SSO and cookie sharing between MSAL and your iOS app, use one of the following solutions:
36+
37+
Use `ASWebAuthenticationSession` and Safari system browser (`UIApplication.shared.open`)
38+
39+
- Use Case: Your app uses MSAL together with the default `ASWebAuthenticationSession` instance, and you open external links or logout flows in Safari system browser.
40+
- **Note:** `ASWebAuthenticationSession` is the recommended method for MSAL interactive authentication on iOS 12+. It's the only supported method on iOS 13+. This method is privacy-preserving and shares cookies with system browser. SSO works between MSAL and Safari browser application because they share cookies through the system authentication session.
41+
42+
Use `WKWebView`
43+
44+
- Use Case: You explicitly configure MSAL to use `WKWebView`, and your app also uses `WKWebView` for related workflows.
45+
- **Note:** You can use `WKWebView` for a consistent experience within your app. However, because it's sandboxed, `WKWebView` doesn't share session cookies with Safari system browser or other apps. In this condition, SSO support is limited to use within your app.
46+
47+
For more information, see [Customizing webviews and browsers](/azure/active-directory/develop/customize-webviews).
48+
49+
[!INCLUDE [Third-party disclaimer](../../../includes/third-party-disclaimer.md)]
50+
51+
[!INCLUDE [Azure Help Support](../../../includes/azure-help-support.md)]

support/entra/entra-id/toc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@
6161
href: app-integration/package-inspector-msal-android-native.md
6262
- name: Enable MSAL4J logging in a Spring Boot web application
6363
href: app-integration/enable-msal4j-logging-spring-boot-webapp.md
64-
- name: Role-based access control issues in WebAssembly app
65-
href: app-integration/troubleshoot-rabc-issues-webassembly-auth-apps.md
64+
- name: Repeated login prompts in iOS MSAL implementation
65+
href: app-integration/repeat-login-prompts-in-msal-ios-app.md
6666

6767

6868
- name: Troubleshoot adding apps

support/windows-server/remote/set-up-remote-desktop-licensing-across-domains-forests-workgroups.md

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
---
22
title: Set up RD licensing across domains forests or workgroups
33
description: This article talks about the questions around the supportability (or recommended approach) of setting up Remote Desktop (RD) licensing across domain, forest, or work groups.
4-
ms.date: 01/15/2025
4+
ms.date: 04/01/2025
55
manager: dcscontentpm
66
audience: itpro
77
ms.topic: troubleshooting
8-
ms.reviewer: kaushika, akhleshs, sabinn
8+
ms.reviewer: kaushika, akhleshs, sabinn, warrenw, timnewton
99
ms.custom:
1010
- sap:remote desktop services and terminal services\licensing for remote desktop services (terminal services)
1111
- pcy:WinComm User Experience
1212
---
13-
# Best practices for setting up RDS licensing across Active Directory domains/forests or work groups
13+
# Best practices for setting up RD licensing across Active Directory domains/forests or work groups
1414

1515
This article provides information on the questions around the supportability (or recommended approach) of setting up Remote Desktop (RD) licensing across domain, forest, or work groups.
1616

17-
_Applies to:_ &nbsp; Windows Server 2008 R2 Service Pack 1
1817
_Original KB number:_ &nbsp; 2473823
1918

2019
> [!NOTE]
@@ -39,30 +38,30 @@ For both Per Device and Per User CALs issuance to work, the RD Session Host and
3938

4039
Here is more information on these scenarios:
4140

42-
- RDS Host and RDS licensing servers are in the same work group
41+
- RD Session Host and RD licensing servers are in the same work group
4342

44-
Consider the following points while configuring RDS and RDS licensing servers in a work group environment:
43+
Consider the following points while configuring RDS and RD licensing servers in a work group environment:
4544

46-
- We can use ONLY Per Device CALs in a work group environment. So, you should install only Per Device CALs on RDS licensing server.
45+
- We can use ONLY Per Device CALs in a work group environment. So, you should install only Per Device CALs on RD licensing server.
4746
- Per User CAL tracking and reporting is not supported in work group mode.
48-
- RDS Host and RDS licensing server roles can both be installed on the same server.
49-
- If you install RDS licensing server on a different server in the work group, ensure that the RDS server is able to access RDS licensing server.
47+
- RD Session Host and RD licensing server roles can both be installed on the same server.
48+
- If you install RD licensing server on a different server in the work group, ensure that the RDS server is able to access RD licensing server.
5049

5150
In Windows 2008 R2, automatic license server discovery is no longer supported for RD Session Host servers. You must specify the name of a license server for the RD Session Host server to use by using Remote Desktop Session Host Configuration snap-in. For more information, see [Specify a License Server for an RD Session Host Server to Use](/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc770585(v=ws.11)).
5251

53-
- RDS Host and RDS licensing servers are in the same domain
52+
- RD Session Host and RD licensing servers are in the same domain
5453

55-
In an Active Directory Domain scenario, we can have RDS Host and RDS licensing servers either on the same server or different servers. Consider the following points while configuring RDS environment in a domain scenario:
56-
57-
- You can install both (Per Device and Per User) CALs on RDS licensing server.
54+
In an Active Directory Domain scenario, we can have RD Session Host and RD licensing servers either on the same server or different servers. Consider the following points while configuring RDS environment in a domain scenario:
55+
56+
- You can install both (Per Device and Per User) CALs on RD licensing server.
5857

5958
- The computer account for the license server must be a member of the Terminal Server License Servers group in AD DS. If the license server is installed on a domain controller, the Network Service account must also be a member of the Terminal Server License Servers group.
6059

61-
- To restrict the issuance of RDS CALs, you can add RDS Host Servers into Terminal Server Computers group on RDS licensing server and then enable the License server security group policy setting on RDS licensing server.
60+
- To restrict the issuance of RDS CALs, you can add RD Session Host servers into Terminal Server Computers group on RD licensing server and then enable the License server security group policy setting on the RD licensing server.
6261

6362
- The License server security group policy setting is located in Computer Configuration\Policies\Administrative Templates\Windows Components\Remote \RD licensing and can be configured by using either the Local Group Policy Editor or the Group Console (GPMC).
6463

65-
- RDS Host Servers are in one domain/forest and RDS licensing server is in another domain/forest
64+
- RD Session Host servers are in one domain/forest and RD licensing server is in another domain/forest
6665

6766
In this kind of scenario, you should consider the following points:
6867

@@ -72,11 +71,11 @@ Here is more information on these scenarios:
7271

7372
- To issue RDS Per User CALs to users in other domains, there must be a two-way trust between the domains, and the license server must be a member of the Terminal Server License Servers group in those domains.
7473

75-
- To restrict the issuance of RDS CALs, you can add RDS Host Servers into Terminal Server Computers group on RDS licensing servers.
74+
- To restrict the issuance of RDS CALs, you can add RD Session Host servers into Terminal Server Computers group on RD licensing servers.
7675

77-
- Configure RDS licensing server on all RDS Host Servers in each domain/forest. You can do it through RDS host configuration snap-in or through a group policy.
76+
- Configure RD licensing server on all RD Session Host servers in each domain/forest. You can do it through RD Session Host configuration snap-in or through a group policy.
7877

79-
- Add administrators group of each domain/forest in the local administrators of RDS licensing server. This way, you'll not get a prompt to enter your credentials when you'll open RDS host configuration snap-ins in trusted domains/forests.
78+
- Add administrators group of each domain/forest in the local administrators of RD licensing server. This way, you'll not get a prompt to enter your credentials when you'll open RD Session Host configuration snap-ins in trusted domains/forests.
8079

8180
## Data collection
8281

0 commit comments

Comments
 (0)