-
Notifications
You must be signed in to change notification settings - Fork 147
Configuring your app
Jason Kim edited this page May 2, 2019
·
3 revisions
- Register your app in the Azure portal
- Add your application's redirect URI scheme to your
Info.plist
file, it will be in the format ofmsauth.[BUNDLE_ID]
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>msauth.[BUNDLE_ID]</string>
</array>
</dict>
</array>
- Add
LSApplicationQueriesSchemes
to allow making call to Microsoft Authenticator if installed.
<key>LSApplicationQueriesSchemes</key>
<array>
<string>msauth</string>
<string>msauthv2</string>
</array>
See more info about configuring redirect uri for MSAL in our Wiki
- Add a new keychain group to your project Capabilities
com.microsoft.adalcache
. See more information about keychain groups for MSAL in our Wiki
- To handle a callback, add the following to
appDelegate
:
Swift
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
guard let sourceApplication = options[UIApplication.OpenURLOptionsKey.sourceApplication] as? String else {
return false
}
return MSALPublicClientApplication.handleMSALResponse(url, sourceApplication: sourceApplication)
}
Objective-C
- (BOOL)application:(UIApplication *)app
openURL:(NSURL *)url
options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{
return [MSALPublicClientApplication handleMSALResponse:url
sourceApplication:options[UIApplicationOpenURLOptionsSourceApplicationKey]];
}
- Customizing Browsers and WebViews
- Logging
- Sovereign clouds
- B2C
- Auth Telemetry (coming soon)
- MSAL questions, bugs and issues (coming soon)
- Redirect URIs
- Requesting individual claims
- Keychain cache
- SSL issues
- iOS 13 and macOS 10.15 support
- Releases
- Roadmap (coming soon)