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/single-sign-on-macos-ios.md
+50-52Lines changed: 50 additions & 52 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Configure SSO on macOS and iOS
2
+
title: Configure SSO on macOS and iOS
3
3
description: Learn how to configure single sign on (SSO) on macOS and iOS.
4
4
services: active-directory
5
5
author: henrymbuguakiarie
@@ -9,35 +9,33 @@ ms.service: active-directory
9
9
ms.subservice: develop
10
10
ms.topic: conceptual
11
11
ms.workload: identity
12
-
ms.date: 02/03/2020
12
+
ms.date: 11/23/2022
13
13
ms.author: henrymbugua
14
-
ms.reviewer:
15
-
ms.custom: aaddev
14
+
ms.reviewer:
15
+
ms.custom: aaddev, engagement-fy23
16
16
---
17
17
18
18
# Configure SSO on macOS and iOS
19
19
20
-
The Microsoft Authentication Library (MSAL) for macOS and iOS supports Single Sign-on (SSO) between macOS/iOS apps and browsers. This article covers the following SSO scenarios:
20
+
The Microsoft Authentication Library (MSAL) for macOS and iOS supports single sign-on (SSO) between macOS/iOS apps and browsers. This article covers the following SSO scenarios:
21
21
22
22
-[Silent SSO between multiple apps](#silent-sso-between-apps)
23
23
24
-
This type of SSO works between multiple apps distributed by the same Apple Developer. It provides silent SSO (that is, the user isn't prompted for credentials) by reading refresh tokens written by other apps from the keychain, and exchanging them for access tokens silently.
24
+
This type of SSO works between multiple apps distributed by the same Apple Developer. It provides silent SSO (that is, the user isn't prompted for credentials) by reading refresh tokens written by other apps from the keychain, and exchanging them for access tokens silently.
25
25
26
26
-[SSO through Authentication broker](#sso-through-authentication-broker-on-ios)
27
27
28
-
> [!IMPORTANT]
29
-
> This flow is not available on macOS.
28
+
The SSO through authentication broker isn't available on macOS.
30
29
31
-
Microsoft provides apps, called brokers, that enable SSO between applications from different vendors as long as the mobile device is registered with Azure Active Directory (AAD). This type of SSO requires a broker application be installed on the user's device.
30
+
Microsoft provides apps called brokers, that enable SSO between applications from different vendors as long as the mobile device is registered with Azure Active Directory (Azure AD). This type of SSO requires a broker application be installed on the user's device.
32
31
33
32
-**SSO between MSAL and Safari**
34
33
35
34
SSO is achieved through the [ASWebAuthenticationSession](https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession?language=objc) class. It uses existing sign-in state from other apps and the Safari browser. It's not limited to apps distributed by the same Apple Developer, but it requires some user interaction.
36
35
37
36
If you use the default web view in your app to sign in users, you'll get automatic SSO between MSAL-based applications and Safari. To learn more about the web views that MSAL supports, visit [Customize browsers and WebViews](customize-webviews.md).
38
37
39
-
> [!IMPORTANT]
40
-
> This type of SSO is currently not available on macOS. MSAL on macOS only supports WKWebView which doesn't have SSO support with Safari.
38
+
This type of SSO is currently not available on macOS. MSAL on macOS only supports WKWebView which doesn't have SSO support with Safari.
41
39
42
40
-**Silent SSO between ADAL and MSAL macOS/iOS apps**
43
41
@@ -64,10 +62,9 @@ The way the Microsoft identity platform tells apps that use the same Application
> The format of redirect URIs must be compatible with the format MSAL supports, which is documented in [MSAL Redirect URI format requirements](redirect-uris-ios.md#msal-redirect-uri-format-requirements).
67
+
The format of redirect URIs must be compatible with the format MSAL supports, which is documented in [MSAL Redirect URI format requirements](redirect-uris-ios.md#msal-redirect-uri-format-requirements).
71
68
72
69
### Setup keychain sharing between applications
73
70
@@ -92,8 +89,9 @@ When you have the entitlements set up correctly, you'll see a `entitlements.plis
92
89
#### Add a new keychain group
93
90
94
91
Add a new keychain group to your project **Capabilities**. The keychain group should be:
95
-
*`com.microsoft.adalcache` on iOS
96
-
*`com.microsoft.identity.universalstorage` on macOS.
92
+
93
+
-`com.microsoft.adalcache` on iOS
94
+
-`com.microsoft.identity.universalstorage` on macOS.
@@ -136,48 +134,48 @@ That's it! The Microsoft identity SDK will now share credentials across all your
136
134
137
135
## SSO through Authentication broker on iOS
138
136
139
-
MSAL provides support for brokered authentication with Microsoft Authenticator. Microsoft Authenticator provides SSO for AAD registered devices, and also helps your application follow Conditional Access policies.
137
+
MSAL provides support for brokered authentication with Microsoft Authenticator. Microsoft Authenticator provides SSO for Azure AD registered devices, and also helps your application follow Conditional Access policies.
140
138
141
139
The following steps are how you enable SSO using an authentication broker for your app:
142
140
143
141
1. Register a broker compatible Redirect URI format for the application in your app's Info.plist. The broker compatible Redirect URI format is `msauth.<app.bundle.id>://auth`. Replace `<app.bundle.id>`` with your application's bundle ID. For example:
144
142
145
-
```xml
146
-
<key>CFBundleURLSchemes</key>
147
-
<array>
148
-
<string>msauth.<app.bundle.id></string>
149
-
</array>
150
-
```
143
+
```xml
144
+
<key>CFBundleURLSchemes</key>
145
+
<array>
146
+
<string>msauth.<app.bundle.id></string>
147
+
</array>
148
+
```
151
149
152
150
1. Add following schemes to your app's Info.plist under `LSApplicationQueriesSchemes`:
153
151
154
-
```xml
155
-
<key>LSApplicationQueriesSchemes</key>
156
-
<array>
157
-
<string>msauthv2</string>
158
-
<string>msauthv3</string>
159
-
</array>
160
-
```
152
+
```xml
153
+
<key>LSApplicationQueriesSchemes</key>
154
+
<array>
155
+
<string>msauthv2</string>
156
+
<string>msauthv3</string>
157
+
</array>
158
+
```
161
159
162
160
1. Add the following to your `AppDelegate.m` file to handle callbacks:
0 commit comments