Gå til innholdet

The Usual Failures, Every Mechanism

Dette innholdet er ikke tilgjengelig på ditt språk.

Module 4 of 6 in the chapter Watching the Door: Troubleshooting and Audit, chapter 16 of Securing Salesforce: Identity and Access. Each module stands on its own.

The question this module answers: What usually goes wrong at each door, and how do you recognize it?

After enough login failures, you notice something. They’re rarely new. The same handful of causes come back, on different projects, with different people, and each one leaves the same marks. If you know the marks, module 1’s method gets to the answer in minutes instead of an afternoon.

This module is that list. For each failure: what the user sees or says, where it shows, the usual cause, and the fix. It isn’t every failure. It’s the ones worth knowing by sight.

Chapter 6, module 7 covered single sign-on’s five usual causes. In short:

  • The clocks. Assertion Expired on a brand-new assertion: the identity provider’s clock has drifted.
  • The certificate. Signature Invalid for everyone, from one day: the identity provider has a new certificate, and Salesforce has the old one.
  • A value that doesn’t match. Issuer Mismatched, Audience Invalid, Recipient Mismatched: compare the assertion with the setting.
  • A My Domain change. Single sign-on stops after the login address changed: the identity provider still has the old values.
  • Device Activation. An activation prompt after the identity provider’s MFA: the assertion doesn’t say MFA happened.

Everything below is beyond those five.

Six failures beyond chapter 6 Six failures beyond chapter 6. Single sign-on fails for her alone: look in Login History and the JIT error, code 1, 2 or 12; usually her Federation ID differs in case or a space. redirect_uri_mismatch: look at the callback URL, error= on the redirect; usually it isn't exactly the app's URL, a slash, http, a port. invalid_app_access, or App access denied: look at the callback URL or the Identity Provider Event Log; usually she isn't approved for the app, no profile or permission set. invalid_grant on something that worked yesterday: look at the token endpoint's answer and read the reason; usually the token expired or was revoked, or login hours or IP ranges. New people can't get in, everyone else can: JIT error 11 in the URL; usually the license limit, and nobody changed a setting. "I never got the code": look in Identity Verification History, method and status; usually an old phone or email. Footnote: a selection, not every failure; Salesforce Help and knowledge articles, checked 2026-11-06. {"author": "Steve Simpson", "blueprint": "1.0.0", "builder": "standard 1.59.0", "built": "2026-11-20", "id": "DGM-IAM-TRB-04", "rights": "\u00a9 2026 Twinshark LLC. All rights reserved.", "template": "cells 0.5.0", "theme": "stevetecharc 1.4.0"} WHAT YOU HEAR WHERE IT SHOWS USUALLY SSO fails for her alone Login History, JIT error code 1, 2 or 12 Her Federation ID differs in case or a space redirect_uri_mismatch The callback URL error= on the redirect Not exactly the app's URL a slash, http, a port invalid_app_access or App access denied The callback URL or the Identity Provider Event Log Not approved for the app no profile or permission set invalid_grant, worked yesterday The token endpoint's answer read the reason Token expired or revoked or login hours, IP ranges New people can't get in everyone else can JIT error 11 in the URL The license limit nobody changed a setting "I never got the code" Identity Verification History method and status An old phone or email where the code went look in usually look in usually look in usually look in usually look in usually look in usually A selection, not every failure. Salesforce Help and knowledge articles, checked 2026-11-06. HOW TO READ IT the screw © 2026 Twinshark LLC · stevetecharc.com
Click to enlarge

Single sign-on fails for her, and only her. Everyone else in her team gets in. The usual cause is her Federation ID. Salesforce is strict: “A difference in case or whitespace will cause login to fail” (K2). If just-in-time provisioning is on, the URL tells you more: code 1 is a missing Federation ID, 2 a mismatched one, and 12 a Federation ID and username that don’t match (S7). The fix is to make the value in her user record match the identity provider’s exactly, and to ask how it got different, because if it was typed by hand, there will be others.

She can’t use single sign-on at all. Salesforce’s own single sign-on article checks this before anything else: does she have the permission for single sign-on (K2)? Chapter 4, module 5 gave admins a reason not to have it. A new user copied from an admin’s profile or permission sets may not have it either.

“I never got the code.” Not a single sign-on problem. Go to Identity Verification History (module 2) and look at where the code went. Salesforce’s admin guide says to “verify where Salesforce is trying to send the user’s verification code” (K1). An old phone, a mobile number in the wrong format, an email address from before her name changed.

Nothing in Login History at all. The request never reached Salesforce as her. Usually the username: a typo, an old one saved in the browser, invisible characters (K1). Or, with single sign-on, the identity provider stopped her before Salesforce saw anything.

A locked or inactive user. Login History says so in plain words: a password lockout (code 20014) or an inactive user (20018) (S1). From OAuth, inactive_user (S6). Easy to find, once you look instead of guessing.

redirect_uri_mismatch. The callback URL the app sent isn’t exactly one of the app’s callback URLs (S6). It nearly always appears right after a change: a new environment, a new domain, someone adding https or a trailing slash. Exact means exact.

invalid_app_access, or App access denied. The app is set to admin-approved users, and this user isn’t in a profile or permission set for it (S6). When Salesforce is the identity provider, the Identity Provider Event Log shows App access denied, or “User does not have access to this service provider” (S11). Chapter 13, module 2’s question, who may use it, answered with a no.

invalid_grant on something that worked yesterday. This is the one with many causes, so read the description after it (S6). For an integration that ran fine for months, it’s usually the token: the refresh token expired by the app’s policy, or someone revoked it. Revoking is quick on purpose: when an admin removes a session on the Session Management page, “for most Salesforce services, ending the session immediately revokes the associated access token. For some services, it can take up to 30 minutes” (S8). Then check who removed it, and why: module 5.

Login hours and IP ranges. A user who can log in at the office and not at home, or in the morning and not at night. Login History shows a login outside the hours she’s allowed (code 502) (S1). From OAuth, invalid_grant with “IP restricted or invalid login hours” (S6). The profile’s settings are doing their job; the question is whether the job is right.

When it’s the people you didn’t expect

Section titled “When it’s the people you didn’t expect”

New people can’t get in; everyone else can. Just-in-time provisioning worked for months. Then new hires start failing, and nobody changed a thing. JIT error 11: license limit exceeded (S7). Nobody changed the setting. The licenses ran out.

A handler that throws. Your JIT handler, registration handler or Login Discovery handler fails, and the user sees a login failure. JIT error 41 is an execution error in the handler (S7); REGISTRATION_HANDLER_ERROR is the registration handler’s (S6). Module 3 showed how to get the handler’s debug log. The lasting fix is in the code: handle the case it didn’t expect, and fail with a message someone can act on.

The admin who locked themself out. Single sign-on for everyone, including the admins, and the identity provider is down. This one isn’t diagnosed; it’s prevented. Chapter 4, module 5, before the bad day.

When it’s a date on Salesforce’s calendar

Section titled “When it’s a date on Salesforce’s calendar”

Some failures are announced months ahead. Salesforce retires a flow or tightens a rule on a date, and anything still depending on the old way stops on that date. Two in this course: the user-agent flow retires on 2027-02-20 (chapter 9, module 5), and from 2027-03-30, apps without the required security controls can’t be installed in other orgs (chapter 13, module 3). Neither is a mystery on the day, if someone read the notice. Put these dates on the same calendar as your certificates.

Test knowledge. In my experience, be ready to look at a symptom and name the likely cause: a Federation ID that doesn’t match exactly, a callback URL mismatch, a user not approved for the app, an expired or revoked token, a just-in-time license limit. Know where each one shows.

Module 5: who did what. Not “why did this login fail?” but “who logged in, how, and who changed the door?”

  • Where Federation IDs come from, and that nobody types them by hand.
  • Refresh token policies for each integration, and who is told before one expires.
  • License headroom for just-in-time provisioning, watched before new people start.
  • Error handling in every handler, with a message that names the problem.
  • One calendar for certificates, retirements and Salesforce’s enforcement dates.