Microsoft Entra ID
Authentication

Tutorial Native Authentication Ios Macos Identity Provider Sign In Sign Up

In brief

The tutorial for adding federated identity provider sign-in and sign-up to iOS apps using native authentication web flow was deleted, including prerequisites, provider configuration links, and Swift examples.

What Entra admins need to know

No administrator action is stated. Teams relying on this tutorial should review their documentation links and implementation guidance.

This editorial summary was generated by AI from the documentation changes. Verify important details in the full Microsoft Learn article.

Documentation change

The comparison below shows only the changed extract. Use the full-page view for complete context.

deleted file mode 100644

title: Add federated identity provider sign-in and sign-up to an iOS app using native authentication web flow description: Learn how to enable federated identity provider sign-in and sign-up in an iOS app using Microsoft Entra native authentication with web-based authentication flow.

manager: pmwongera

ms.service: identity-platform

ms.subservice: external ms.topic: tutorial ms.date: 04/10/2026 ms.custom: #Customer intent: As an iOS developer, I want to enable federated identity provider sign-in and sign-up using native authentication web flow so that users can authenticate with existing social accounts like Apple, Google, or Facebook.

Tutorial: Add federated identity provider sign-in and sign-up web flow to your iOS app

[!INCLUDE applies-to-external-only]

This tutorial demonstrates how to implement federated identity provider (IdP) authentication into your iOS app using native authentication with web flow. Federated IdP authentication allows users to sign in or sign up using their existing accounts from providers like Apple, Facebook, Google and custom OIDC providers.

In this tutorial, you learn how to:

[!div class="checklist"]

  • Sign in a user using a federated identity provider via web flow
  • Sign up a user using a federated identity provider via web flow

Prerequisites

  1. Complete the steps in Tutorial: Prepare your iOS/macOS app for native authentication.

  2. Configure federated identity providers in your Microsoft Entra External ID tenant. Follow the steps in the Microsoft Entra admin center to add and configure your desired identity providers:

  3. Ensure your app supports web fallback Tutorial: Support web fallback.

  4. Add/update the Microsoft Authentication Library (MSAL) dependency to at least 2.6.0.

  5. If you'd like to explore our federated IdP Sign in and Sign up implementation, take a look at our sample iOS application before getting started.

Sign in a user with a federated identity provider

To sign in a user with a federated identity provider via web flow, you need to first identify the identity provider to authenticate with, and the corresponding domain_hint.

  • Use the identity providers defined in the prerequisite configuration section.

  • Use the domain_hint parameter to direct authentication to a specific identity provider. Choose one of the following values:

    • "Apple" for Apple
    • "Facebook" for Facebook
    • "Google" for Google

To sign in a user, you need to:

  1. Create a user interface that lets the user sign in with a federated identity provider. This interface should identify a specific identity provider and its corresponding domain_hint.

  2. Once domain_hint value is identified from the client app, create MSALInteractiveTokenParameters, set domain_hint and call acquireToken(with: parameters) method of MSALNativeAuthPublicClientApplication to trigger web authentication with Social IdP like below.

    Use the Prompt type value as .login to force interactive authentication, even if user is signed in.

    let parameters = MSALInteractiveTokenParameters(scopes: ["User.Read"], webviewParameters: webviewParams)
    parameters.promptType = .login
    parameters.domainHint = domainHint
    
    nativeAuth.acquireToken(with: parameters) { [weak self] (result: MSALResult?, error: Error?) in
        guard let self = self else { return }
    
        if let error = error {
            self.showResultText("Error acquiring token: \(error)")
            return
        }
    
        self.msalAccount = result?.account
    
        guard let msalAccount = self.msalAccount else {
            self.showResultText("Could not acquire token: No result or account returned")
            return
        }
    
        self.updateUI()
    }
    
  3. You can also retrieve the current cached account after successful authentication by using the getNativeAuthUserAccount() from MSALNativeAuthPublicClientApplication:

        if let account = nativeAuth.getNativeAuthUserAccount() {
            ...
        }
    

Sign up a user with a federated identity provider

To sign up a user with a federated identity provider, the process is almost the same as signing in, with a minor change to the Prompt value: use .create.

    let parameters = MSALInteractiveTokenParameters(scopes: ["User.Read"], webviewParameters: webviewParams)
    parameters.promptType = .create
    parameters.domainHint = domainHint

    nativeAuth.acquireToken(with: parameters) { [weak self] (result: MSALResult?, error: Error?) in
        ...
    }

Related content

Daily Entra.News

Get daily email updates

Get a concise summary of the latest Microsoft Entra updates delivered straight to your inbox.

Loading the secure signup form…