Loading
Prepare for Email to Become the Default Login ExperienceRead More

Salesforce Mobile App: Single Sign-On overview

Publish Date: Sep 7, 2026
Description

The Salesforce Mobile App for iOS and Android authenticates through a sandboxed webview, which behaves differently from a desktop browser. Standard browser-based authentication methods such as Windows Integrated Authentication (NTLM/WIA) are not supported and will cause login failures in the mobile app. If the configuration requirements in this article are not met, users may experience unpredictable or intermittent login failures. Even if some users or login attempts succeed, review all steps to restore consistent functionality across all devices.

Important — SP-Initiated SSO Required: The Salesforce Mobile App only supports Service Provider (SP) Initiated SSO. If your organization uses Identity Provider (IdP) Initiated authentication, the mobile app will not authenticate correctly. Switch to SP-Initiated SSO before following any other troubleshooting steps in this article.

Resolution
 

Why the Salesforce Mobile App Requires Specific SSO Configuration

The Salesforce Mobile App authenticates through a sandboxed webview, not a full desktop browser. Several authentication patterns that work transparently in a browser are not supported on mobile. Specifically:

  • Windows Integrated Authentication (NTLM/WIA) is not supported. The webview cannot negotiate NTLM or Kerberos at the OS level. This causes 401 errors or a blank screen.

  • The IdP login page must present a standard HTML form for username and password entry.

  • The RelayState value included in the SAML request must be returned unchanged by the IdP. If it is modified, dropped, or truncated, the OAuth handshake fails.

  • Only SP-Initiated SSO is supported. IdP-Initiated SSO flows are not compatible with the Salesforce Mobile App.

Prerequisites

  1. Verify My Domain: With the enforcement of Enhanced Domains, My Domain is enabled by default in all active Salesforce organizations. Ensure your URLs are correctly deployed: My Domain Overview

  2. Authentication Configuration: Add your SAML SSO configuration to the Authentication Service in the My Domain Authentication Configuration section: Add Identity Providers to the My Domain Login Page

Note: Users must enter their My Domain URL as a custom server connection in the Salesforce Mobile App. Do not use the "Use custom domain" link on the standard Salesforce login screen. See: Switch Login Server in Salesforce Mobile Apps

Multi-Factor Authentication (MFA) & Hardware Security Keys

Salesforce requires MFA for all UI logins, including SSO.

  • Session Level Mapping: If your IdP handles MFA, your SSO configuration must pass an AuthnContextClassRef value that is mapped to a High Assurance session level in Salesforce (Setup > Session Settings). If this mapping is missing, Salesforce will prompt the user for MFA after they complete the IdP login.

  • Hardware Security Keys: Hardware keys (FIDO2/WebAuthn/Passkeys) often fail or are unresponsive inside standard embedded webviews. If your mobile users authenticate using these methods at the IdP level, you must enable "Use the native browser for user authentication" in your My Domain Settings (see the Advanced Authentication section below).

  • Troubleshoot Salesforce Mobile PRMFA Related Issues: PRMFA with Salesforce Mobile App Logins


Identity Provider Configuration Requirements

Forms-Based Login Page Requirement
After the user enters the My Domain URL in the Salesforce Mobile App, the IdP must present a standard HTML form. WIA and other challenge-based prompts cause a 401 error or a blank screen.

RelayState Configuration & 80-Byte Limits

When the Salesforce Mobile App initiates a SAML login, it includes a RelayState parameter to complete the OAuth handshake and route the user back into the app.

  • The SAML 2.0 specification recommends an 80-byte limit for the RelayState. Because Salesforce uses RelayState to pass complex OAuth routing for the mobile app, the payload frequently exceeds 80 bytes.

  • Administrators must configure strict IdPs to not enforce the 80-byte limit. If the IdP modifies, URL-encodes, truncates, or drops the RelayState, authentication will fail.

HTTP POST or HTTP Redirect Bindings

The IdP must support HTTP POST or HTTP Redirect bindings. If using AD FS, it is recommended to set HTTP Redirect binding in the Salesforce SSO settings, and keep HTTP POST on the AD FS side. If the SAML AuthnRequest URL exceeds IIS's default maxUrl of 4096 bytes, switch to HTTP POST binding to avoid 404 errors.


Common Issues & Troubleshooting

  • Full Site Interface Appears Inside the Salesforce Mobile App

    • This occurs when the RelayState is not returned correctly by the IdP, or when the organization uses IdP-Initiated SSO. Verify the IdP Login URL in your SAML SSO settings does not contain IdP-initiated parameters (e.g., idpinitiatedsignon.aspx or startSSO.ping).

  • 401 Unauthorized Error

    • Occurs when the IdP returns a WIA/NTLM challenge that the mobile webview cannot negotiate. An administrator must configure a forms-based login endpoint for mobile devices and ensure it is accessible from the device's network.

  • Blank or White Screen

    • Typically indicates a redirect loop, an unsupported authentication challenge, or a misconfigured My Domain login page. Confirm the My Domain Authentication Configuration includes your SAML IdP. If Azure AD Conditional Access or Intune app protection policies are blocking the embedded webview, enable native browser authentication.

  • InResponseTo: Invalid SAML Assertion Error

    • Clock skew: The IdP server clock is out of sync with Salesforce. SAML assertions are valid for a short time window. Ensure Network Time Protocol (NTP) is correctly configured on the IdP server.

    • IdP-Initiated SSO in use: The IdP is sending an unsolicited SAML response. Switch to SP-Initiated SSO.

    • Stale assertion: A previously used assertion is being submitted again (e.g., the user navigated back and re-submitted).

  • OAuth Error 1800

    • Occurs when Salesforce cannot use the RelayState value returned in the SAML response.
      • Check that the IdP is not altering, double URL-encoding, or truncating the RelayState.

      • OAuth Timestamp Inactivity: If a user opens the app, initiates SSO, but leaves their phone locked on the IdP login screen for an extended period, the OAuth timestamp expires. Advise the user to force-close the app and retry to generate a fresh OAuth request.

  • Error 403: disallowed_useragent (Google or OpenID Connect SSO)

    • Google blocks OAuth 2.0 and OpenID Connect flows in embedded webviews. Enable native browser authentication in My Domain settings to route the login through the device's default browser (Safari or Chrome).

  • IdP Migration Routing Issues (Clearing Mobile App Cache)

    • If your organization recently migrated IdPs (e.g., from AD FS to Entra ID), mobile users might experience caching issues where the app attempts to route to the old IdP. Instruct users to tap the Gear Icon on the mobile login page, delete their existing Custom Connection, and re-add the My Domain URL to flush the routing state.


Advanced Authentication & Native Browser Support

Some authentication methods (Google OpenID Connect, Hardware Security Keys, Azure AD Conditional Access, Intune policies) require the device's native browser.

To Enable Native Browser Authentication:

  1. In Salesforce Setup, go to My Domain > Authentication Configuration.

  2. Select Use the native browser for user authentication.

  • iOS User Prompt Expected Behavior: When native browser authentication is enabled, iOS users will see a system prompt: "Salesforce wants to Use 'login.salesforce.com' to Sign In." This is an unavoidable Apple iOS security feature (ASWebAuthenticationSession). Users must tap "Continue" to proceed.

  • Experience Cloud Note: Native browser authentication is not supported when logging in to an Experience Cloud site through the standard Salesforce Mobile App. However, organizations using Mobile Publisher for Experience Cloud do support native browser authentication.


Microsoft Entra ID (Formerly Azure AD)

Microsoft Entra ID is the recommended modern replacement for AD FS. If your organization uses Entra ID, many AD FS-specific issues in this article (NTLM/WIA, forms-based configuration) do not apply. Entra ID handles authentication through its own cloud-based flow.

For complete setup instructions, including mobile app testing steps, see the latest official Microsoft tutorial: Configure Salesforce for Single Sign-On in Microsoft Entra ID

If your organization is currently planning an AD FS migration, see: AD FS Decommission Reference

 

NOTE: For MDM (Mobile Device Management) and EMM (Enterprise Mobility Management) certificate-based authentication, see: Salesforce Mobile App MDM and EMM Support and Troubleshooting.

Knowledge Article Number

000386791

 
Loading
Salesforce Help | Article