What Salesforce Writes Down
Konten ini belum tersedia dalam bahasa Anda.
Module 2 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 does Salesforce record about every login, and how long does it keep it?
Three logs, two seats
Section titled “Three logs, two seats”Which seat is Salesforce in? You’ve asked that question since chapter 4, and it decides where to look now. When Salesforce is the service provider, the one being logged in to, the record of the attempt is in Login History. When it asks someone to prove it’s really them, a code or an authenticator, that’s in Identity Verification History. And when Salesforce is the identity provider, vouching for a user to another app, the record is in the Identity Provider Event Log.
All three are in every org. You don’t need an add-on to read them. Module 5 comes to what the add-on adds.
Login History
Section titled “Login History”This is the one you’ll open most, and in my experience it can be very critical, especially for integration users. A person logs in when they start work. An integration user has a pattern: the same app, the same door, the same rhythm. In Login History you can see that behavior, and see when it changes. In Setup, Login History lists logins to your org and to your Experience Cloud sites, so Amara’s and Tomás’s logins from chapter 14 are here too (S1). You need the Manage Users or Monitor Login History permission (S1).
How much, and for how long. The page shows up to 20,000 records from the past 6 months. You can download 6 months as a CSV or GZIP file, and “All Logins” includes API logins (S1). Six months sounds like plenty, until someone asks about a login seven months ago. If your company needs a year, someone has to download it on a schedule. That’s a decision, not a default.
The columns that matter for identity. Most are what you’d expect: who, when, where from, which browser, success or failure. A few are worth knowing by name (S1):
- Status. The result, in words: Success, or the name of the failure. Chapter 4, module 6 listed the SAML ones: Signature Invalid, Issuer Mismatched, Audience Invalid, and the others.
- Login Type and Login Subtype. Which door: the application’s own login, SAML, a site, OAuth. For OAuth, the subtype says which flow, and Salesforce adds its advice right there: “For security, we recommend blocking user-agent and username-password flows” (S1). Chapter 9 explained why. If Login History shows them still in use, you’ve found work to do.
- Login URL. Which address she came in through: your My Domain, a site, or something you didn’t expect.
- Authentication Method Reference. For a login through an OpenID Connect provider, what the provider says it checked, for example “which users log in with multi-factor authentication” (S1).
- Source IP and Forwarded for IP. Where the login came from. Not every door fills both: Forwarded for IP “doesn’t get populated for OAuth and single sign-on logins” (S1). Don’t read an empty column as an attacker hiding.
One app at a time. You can make a list view of Login History. For an OAuth app, Salesforce’s own example is to filter Application to OAuth and then by the Login URL (S1). When one app fails and the others don’t (module 1’s second row), that’s the view you want.
The status codes. Behind each status is a code, and Salesforce lists them (S1). A few you’ll meet: 0 is success; 102, password invalid; 501, “Cannot log in from given domain”; 502, “Log in at given time”, a login outside the user’s login hours; 1000, the client app isn’t accessible to the user; 20014, a password lockout; 20018, an inactive user; 20253, a profile with no access to the site. You don’t need to learn them. You need to know the list exists, and to look the code up instead of guessing.
Identity Verification History
Section titled “Identity Verification History”Since chapter 2, MFA and identity verification have been part of nearly every login. When Salesforce asks a user to verify, it writes it down in Identity Verification History: up to 20,000 records, 6 months (S2).
Three columns tell the story (S2):
- Triggered By. Why Salesforce asked: MFA required, Device Activation, a high-assurance session required by a policy, a profile’s session level, an Apex method, Lightning Login.
- Method. How: Salesforce Authenticator, a one-time password app, a security key, a built-in authenticator, email, a text message, a temporary code.
- Status. What happened: Succeeded; Failed with a reason (invalid code, too many attempts); Access denied; Flagged by user, which means she said “that wasn’t me” in the authenticator.
This is the log for the call that starts “I never got the code.” Salesforce’s own admin guide points here when a user sees “Computer activation required”: look at Identity Verification History and “verify where Salesforce is trying to send the user’s verification code” (K1). Often it’s going to an old email address, or a phone number in the wrong format. The same guide adds one I wouldn’t have guessed: email link-screening services can open a reset link before the user does, and use it up (K1).
One more line on that page matters for design. For text messages, “SMS messaging requires a Salesforce add-on license for Identity Verification Credits” (S2). If your plan depends on codes by text, check the license before you promise it.
The Identity Provider Event Log
Section titled “The Identity Provider Event Log”Chapter 7 put Salesforce in the other seat: the identity provider. When an app trusts Salesforce for single sign-on, or uses Salesforce for OAuth, and the login fails, the failure isn’t in Login History in the same way. It’s in the Identity Provider Event Log (S11).
It shows the 50 most recent attempts; for more, build a report (S11). Each row has the Usage Type (IdP-initiated SAML, SP-initiated SAML, OAuth authorization, OAuth token exchange), the service provider, and a status (S11). The statuses read like a list of chapter 7’s mistakes: App access denied; Invalid Signature; Invalid Issuer; User does not have access to this service provider; User does not have a Federation Identifier selected; Invalid grant, with the reason (S11). Salesforce even includes a plain “Unknown Error” for when “the user lost internet connection” (S11). Not every failure is a configuration problem.
The other side writes things down too
Section titled “The other side writes things down too”Salesforce’s logs show what Salesforce saw. When Priya signs in at her company’s identity provider and never arrives, Salesforce saw nothing. The identity provider has its own log, and Salesforce’s single sign-on article sends you there too (K2). So does every app that uses Salesforce as its identity provider. Before the bad day, know who can read those logs, and how to reach them.
Test knowledge. In my experience, know the tools Salesforce gives you to audit and diagnose logins: Login History (logins to the org and its sites), Identity Verification History (MFA and verification), and the Identity Provider Event Log (when Salesforce is the identity provider). Know what each one records, and that each keeps only so much.
What’s next
Section titled “What’s next”Module 3: watching the wire. When the logs don’t say enough, you watch the messages themselves: SAML Tracer, the OAuth error on the callback URL, and debug logs for the handlers you wrote.
What an architect decides here
Section titled “What an architect decides here”- How long login records must be kept, and who downloads them before Salesforce’s 6 months run out.
- Who may read the logs: Monitor Login History is narrower than Manage Users.
- Which OAuth flows show up in Login History, and which of them to block.
- Where verification codes go, and whether text messages need a license you don’t have.
- Who reads the other side’s logs during an outage.
Explore
Section titled “Explore”- Monitor Login History (opens in a new tab) (Salesforce Help; checked 2026-11-21)
- Monitor Identity Verification History (opens in a new tab) (Salesforce Help; checked 2026-11-21)
- Use the Identity Provider Event Log (opens in a new tab) (Salesforce Help; checked 2026-11-21)
