Salesforce Audit & Compliance Features

Salesforce Audit & Compliance Features Every Admin Should Know | CertifySF

Salesforce Audit & Compliance Features Every Admin Should Know

A practitioner’s guide to every native and Shield-powered audit feature in Salesforce — what each one captures, what it leaves out, and how they fit together to satisfy SOX, HIPAA, GDPR, and your auditors.

Security & Compliance Verified: Spring ’26 Reading time: ~16 min

Why audit and compliance matter

Every Salesforce org is a small regulatory environment. SOX wants to know who changed financial data. GDPR wants you to prove which fields hold personal data. HIPAA wants a record of who accessed a patient’s record. PCI DSS wants logs of access to cardholder data. Auditors want immutable evidence that controls are working.

Salesforce provides a layered set of features to answer these questions — some free and native, others bundled into the premium Salesforce Shield add-on. The trouble is that they overlap, they each have different retention periods, and the documentation refers to them under several names (Setup Audit Trail, Audit Trail, Field History, Field Audit Trail, Event Log Files, Event Logs, Real-Time Events…). Knowing which feature captures what — and where each one stops — is the difference between a clean audit and a frantic Friday afternoon trying to reconstruct what happened.

Key concept

Audit answers what happened, when, and by whom. Compliance is the act of proving — to a regulator, an auditor, or your security team — that those audit records exist, are complete, and have been preserved for the required period. The features below address both, but only when configured deliberately.

Two layers, two questions

Most Salesforce audit conversations collapse into two questions, and the features below answer one or the other:

Layer 1Who changed the org (configuration, permissions, metadata)?
Layer 2Who changed or accessed the data (records, fields, reports, exports)?

Setup Audit Trail and Health Check answer Layer 1. Field History Tracking, Field Audit Trail, Login History, and Event Monitoring answer Layer 2. Real-Time Event Monitoring spans both. Data Classification gives auditors the map that tells them which layer to care about for any given field.

Setup Audit Trail: the 180-day configuration logbook

Setup Audit Trail is the single most-asked-about audit feature in Salesforce — and the one most admins underestimate. It records every administrative change made through Setup: profile and permission set edits, field metadata changes, sharing rule modifications, role hierarchy edits, login IP range changes, login flow updates, package installs, and even changes performed by background users from managed packages.

Each entry logs the change, the user who made it, the date, the source IP, and (for delegated administrators) the user who initiated the action. It’s enabled by default — there is no setup step — and accessed at Setup → Quick Find → View Setup Audit Trail.

What it captures vs. what it doesn’t

Captures

Configuration changes

  • Profile, permission set, role edits
  • Field and object metadata changes
  • Sharing rule and OWD updates
  • Login IP ranges, session settings
  • App, tab, page layout edits
  • Package installs and upgrades
  • Apex class and trigger deployments
Doesn’t capture

Data or user activity

  • Record value changes (that’s Field History)
  • Logins (that’s Login History)
  • Report exports or runs (Event Monitoring)
  • API calls (Event Monitoring)
  • UI clicks or page loads (Event Monitoring)
  • Searches and queries (Event Monitoring)

The 180-day cliff

Salesforce retains Setup Audit Trail data for 180 days (six months). The UI displays only the 20 most recent entries; the full 180-day window is accessible only by clicking Download to export a CSV. After 180 days, entries are permanently deleted — there is no native mechanism to extend retention.

Retention warning

The 180-day clock starts when the change is made, not when someone looks. A configuration change made on January 1 is gone by July 1. SOX requires seven years. HIPAA requires six. Standing up a scheduled CSV export to external storage is the single most important compliance task most admins overlook.

The hidden risk: background user changes

Managed packages — including Salesforce’s own — make Setup changes as part of installation and upgrades. These appear in Setup Audit Trail under the package’s user account. When something breaks after an upgrade, the Audit Trail is often where the smoking gun lives. Reviewing it after every release is a high-yield habit.

Admin tip

Schedule a weekly or monthly CSV export of Setup Audit Trail and push the file to a SIEM, cloud bucket, or compliance vault. Pair this with a simple automation that diffs the latest export against the prior one to surface unusual change volume — a leading indicator of accidental admin sprawl or unauthorized access.

Field History Tracking: change capture for record data

Where Setup Audit Trail watches configuration, Field History Tracking watches data. Enable it on an object, pick the fields you care about, and Salesforce records every change to those fields — the old value, the new value, the user, and the timestamp — in the object’s history related list and in the corresponding history object (AccountHistory, OpportunityHistory, {Object}__History for custom objects, and so on).

Setup path

  1. Go to Setup → Object Manager and open the object you want to track.
  2. Click Fields & Relationships, then click Set History Tracking in the upper right.
  3. If this is the first time, tick Enable Field History for the object.
  4. Select the fields to track — up to 20 fields per object on standard Field History Tracking.
  5. Add the {Object} History related list to the page layout to expose the history to users.

What you can — and cannot — track

Most standard objects (Account, Contact, Lead, Opportunity, Case, Order, and so on) and every custom object support field history. The following field types cannot be tracked: formula fields, roll-up summary fields, auto-number fields, the long text area when over 255 characters, and system fields such as CreatedBy and LastModifiedBy (those are already captured everywhere).

Capability Standard Field History
Fields tracked per objectUp to 20
Retention in UI18 months
Retention via API24 months
Counts against data storageNo
API accessSOAP, REST, Bulk API
License requiredIncluded in supported editions
Storage note

Field history data does not count against your org’s data storage limit, which makes it a cheap form of auditing. The 20-field-per-object cap is the real constraint, not storage cost.

Field Audit Trail: Shield’s long-term memory

For organizations that need to track more than 20 fields, retain history longer than 18 months, or both — typically those subject to SOX (seven-year retention), HIPAA (six years), or regulated financial services and healthcare workloads — Salesforce offers Field Audit Trail as part of the Shield add-on. Field Audit Trail extends Field History Tracking with custom retention policies, expanded field capacity, and archival to a Big Object called FieldHistoryArchive.

What’s new in Spring ’26

Spring ’26 raised the Field Audit Trail tracking limit from 60 fields per object to 200 fields per object. Older documentation and study guides still cite the 60-field number — verify against the current Spring ’26 docs before answering any exam question on this limit.

How retention policies work

Retention is governed by a HistoryRetentionPolicy object that you define per tracked object. The policy specifies how many months of history to keep on the live {Object}History object before Salesforce archives it into FieldHistoryArchive. Once Field Audit Trail is enabled, the policy is defined and deployed via the Metadata API, and modified using REST, SOAP, or Tooling API.

Standard vs. Field Audit Trail at a glance

Native

Standard Field History Tracking

  • 20 fields per object
  • 18 months UI / 24 months API
  • No custom retention policy
  • No archive object
  • Included in supported editions
Shield add-on

Field Audit Trail

  • 200 fields per object (Spring ’26)
  • Up to 10 years retention
  • Per-object HistoryRetentionPolicy
  • Archived to FieldHistoryArchive Big Object
  • SOQL access on the archive

Querying the archive

Because FieldHistoryArchive is a Big Object, it has special query rules. You can filter by FieldHistoryType, ParentId, and CreatedDate, but full table scans and aggregate functions like COUNT() are not supported. Plan SOQL queries around a known parent record ID or a bounded date range.

Migration nuance

When you enable Field Audit Trail and define a retention policy, existing field history is not migrated immediately. Salesforce archives existing records in a background batch job that can take time on large orgs. Don’t expect FieldHistoryArchive to be populated the day you enable the feature.

Login History: who’s coming through the door

Every Salesforce org logs login attempts — successful and failed — for the last six months. Login History captures the user, login time, source IP, login type (Application, API, OAuth, etc.), browser, platform, status (Success, Invalid Password, Locked Out, etc.), and the authentication method used.

Access it at Setup → Quick Find → Login History. Like Setup Audit Trail, the data can be downloaded as a CSV, and the underlying LoginHistory object is queryable via SOQL and the API.

What to actually look for

Login History is most valuable when combined with detection logic. A few patterns worth flagging:

Pattern 1A single user logging in from multiple distinct IPs in a short window
Pattern 2Failed logins from IPs outside trusted ranges
Pattern 3Successful logins at unusual hours for that user
Pattern 4Spike in API logins for an integration user (potential credential leak)
Pattern 5“Locked Out” entries against high-privilege users (brute force indicator)
Admin tip

If you need longer than six months of login data, two upgrade paths exist. The cheaper option is to export LoginHistory to external storage on a schedule. The more capable option is to enable Event Monitoring (which retains the Login Event Log File for up to a year) or Real-Time Event Monitoring (which streams a LoginEvent Big Object and supports SOQL queries across years of history).

Event Monitoring: the full activity recorder

If Setup Audit Trail records what changed in the org and Field History records what changed in the data, Event Monitoring records what users did. It captures runtime activity — logins, logouts, API calls, report exports, page loads, URI clicks, Apex executions, Visualforce hits, dashboard runs, login-as-user events, and dozens more — and writes it into the EventLogFile standard object.

Event Monitoring ships in two forms. Free Event Monitoring is included with Enterprise, Performance, Unlimited, and Developer editions but exposes a limited set of event types (Apex Unexpected Exception, CSP Violation, Hostname Redirects, and a few others). Paid Event Monitoring — sold as part of Shield or as a standalone add-on — unlocks the full catalogue of 50+ event types, hourly log generation, and retention of up to one year.

The event types that matter most for compliance

Event Type What it captures
LoginEvery login attempt with method, IP, status
APISOAP, REST, and Bulk API calls
RestApi / BulkApiGranular API tracking by endpoint
ReportExportEvery report download (CSV, Excel, printable view)
ReportEvery report run, with run time and result count
URIEvery Classic page view
LightningPageViewEvery Lightning page load
ApexExecutionEvery trigger, batch, and class invocation
LoginAsAdmin “Login As User” sessions
DataExportMass exports and weekly export downloads

How event logs work

Event log files are CSV files generated asynchronously after the activity occurs — hourly for paid customers and every 24 hours for free customers. Each file is delivered as a record of the EventLogFile object, with the actual CSV stored as a file attachment. To consume them, query EventLogFile via SOQL, retrieve the file body, and parse it locally — or push it to Splunk, Datadog, QRadar, or your SIEM of choice.

Architecture note

Event Log Files are not a system of record. They can have gaps during instance migrations, and the retention window is finite. Treat them as a feed into a downstream archive — don’t rely on Salesforce as your primary long-term storage for event data.

Real-Time Event Monitoring and Transaction Security

The Event Log File model has one drawback for security teams: the delay. By the time a user has exfiltrated 50 reports, the log file describing what happened may not exist for another hour. Real-Time Event Monitoring (RTEM) closes that gap by streaming events through the Salesforce Streaming API and persisting them in Big Object storage for up to six months.

Each streamed event has a sibling Big Object. ReportEvent streams every report view; ReportEventStore persists it. ApiAnomalyEvent streams machine-learning-detected API anomalies; ApiAnomalyEventStore persists them. The same pattern applies to LoginEvent, SessionHijackingEvent, CredentialStuffingEvent, PermissionSetEvent, BulkApiResultEvent, and more.

Threat Detection and Transaction Security

Two capabilities sit on top of the streaming infrastructure:

ML-driven

Threat Detection

  • Anomalous API usage detection
  • Anomalous report runs detection
  • Session hijacking detection
  • Credential stuffing detection
  • Surfaces findings as streamed events
Policy-driven

Enhanced Transaction Security

  • Block actions in real time
  • Require step-up MFA
  • Notify admins via email
  • Works across standard & custom objects
  • Apex interface for async policies
Legacy retirement

The original Transaction Security framework has been retired in favour of Enhanced Transaction Security. If you’re inheriting an org that still uses legacy policies, plan a migration — the new framework supports any standard or custom object, not just the handful in the legacy model.

Health Check: your security configuration score

Health Check is a free, native feature that scores your org’s security settings against a baseline. It’s the easiest “show me where we stand” tool in Salesforce, and it’s the first thing most auditors will ask you to run.

From Setup → Quick Find → Health Check, the tool produces a summary score from 0 to 100, with settings grouped into four risk categories: High-Risk, Medium-Risk, Low-Risk, and Informational. Settings include password policies, session timeouts, login IP ranges, certificate management, sharing model defaults, and dozens of other configurable controls.

Baselines

The default baseline is the Salesforce Baseline Standard, which represents Salesforce’s recommended values. You can upload up to five custom baselines — useful for organisations that need to enforce internal security policies that diverge from Salesforce defaults, or that need to maintain different baselines for different environments (production vs. sandbox).

What the score actually means

Score range Interpretation
90–100%Strong alignment with baseline
80–89%Emerging gaps; review medium-risk items
Below 80%Multiple high-risk findings; remediate before audit

The Fix Risks button is the workhorse: it lets you push baseline-recommended values to settings without leaving the page. Each setting can also be edited individually, which is important for cases where the baseline value conflicts with a known business requirement (for example, your team genuinely needs longer session timeouts for kiosk users).

Admin tip

Run Health Check before every release and again after major configuration changes. Export the result, screenshot the gauge, and commit both to version control. Auditors love a dated trail; “we scored 92 on January 4 and 94 on April 4” is far more reassuring than a single point-in-time number.

Security Center: multi-org compliance at scale

Health Check tells you the security posture of one org. Security Center tells you the security posture of all your orgs at once. It is a paid add-on (sold separately from Shield) and aggregates Health Check scores, user permission summaries, MFA adoption rates, and Setup Audit Trail data across every connected org into a single dashboard.

Why it exists

Enterprises with five, ten, or fifty Salesforce orgs (production, full sandboxes, partial sandboxes, developer orgs, separate business unit instances) face a real visibility problem: which org is exposed today? Security Center surfaces that answer without requiring an admin to log into each org and run Health Check by hand.

What it shows

PostureAggregated Health Check scores across all connected orgs
UsersOver-permissioned users and admin-level permission grants by org
AuthMFA adoption percentages and Single Sign-On configuration
ChangesCross-org Setup Audit Trail summaries and trend lines
MetricsCustom KPIs and policy violations defined by your security team
Not the same as Optimizer

Salesforce Optimizer is a separate, free report that flags feature-specific clean-up opportunities (unused fields, redundant profiles, slow page layouts). Security Center is paid and security-focused. Both are useful, but they answer different questions and live in different parts of Setup.

Data Classification: tagging sensitive fields

Audit features tell you what changed. Data Classification tells you which changes matter. Introduced in Summer ’19 and refined since, it adds four metadata attributes to every field that admins can use to express the regulatory weight and sensitivity of the data that field holds.

The four classification attributes

Attribute What it captures Default values
ComplianceGroup Regulations that govern this field’s data GDPR, HIPAA, PII, PCI, COPPA, custom values
DataSensitivityLevel Sensitivity of the data this field holds Public, Internal, Confidential, Restricted
BusinessOwnerId User or group accountable for this field Lookup to User or Group
BusinessStatus Lifecycle status of the field Active, DeprecateCandidate, Hidden

These attributes live on the FieldDefinition Tooling API object, which means you can query the classification of every field in your org with a single SOQL statement:

SELECT QualifiedApiName, ComplianceGroup, SecurityClassification, BusinessOwnerId FROM FieldDefinition WHERE EntityDefinition.QualifiedApiName IN ('Account','Contact','Lead')

Why this matters for audits

When an auditor asks “show me every field in your org that holds GDPR-relevant data,” the answer should be a SOQL query — not a meeting with the data architect. Data Classification turns that question into a one-line query and feeds downstream tooling: Shield Platform Encryption uses it to suggest encryption targets, Data Detect uses it to auto-tag scan results, and a well-designed data dictionary uses it to surface compliance scope.

Admin tip

Configure classification picklist values once at Setup → Data Classification Settings to match your organisation’s compliance vocabulary (e.g., add “SOX,” “FERPA,” or your internal sensitivity tiers). Then classify systematically — start with the obvious PII fields (email, phone, government ID, financial account numbers) and expand from there.

A layered audit strategy

No single feature satisfies every audit requirement. A defensible compliance posture stacks them — using free tooling where it covers the need, layering Shield where it doesn’t, and pushing data to external archives wherever Salesforce retention falls short of regulatory minimums.

A reference stack

Layer Feature Why it’s there
Configuration auditSetup Audit Trail + scheduled CSV exportTrack org changes; preserve beyond 180 days
Configuration scoringHealth CheckContinuous benchmark against baseline
Data audit (standard)Field History Tracking20 fields per object, 18-month history
Data audit (regulated)Field Audit Trail + HistoryRetentionPolicy200 fields per object, up to 10 years
Access auditLogin History + Event Monitoring Login eventsSix months native, one year with EM
Activity auditEvent MonitoringReports, exports, API, page views
Real-time responseReal-Time Event Monitoring + Transaction SecurityBlock, MFA-challenge, or notify on policy violation
ClassificationData Classification on FieldDefinitionIdentify scope for SOX, GDPR, HIPAA, PCI
Multi-org governanceSecurity CenterCross-org visibility for enterprises

Common pitfalls to avoid

Even well-tooled orgs run into the same failure modes. A few to watch for:

1. Trusting Salesforce as the system of record

Setup Audit Trail expires at 180 days. Field History Tracking expires at 18 months. Login History expires at six months. Event Log Files expire at one year on the most generous tier. None of these are systems of record for multi-year compliance. Export early, export often.

2. Confusing standard with Shield

The phrase “audit trail” gets used loosely in Salesforce documentation. Setup Audit Trail is free. Field Audit Trail is paid Shield. They are different features with different scopes. Misreading the name leads to either over-paying for a feature you don’t need or under-engineering for a requirement you can’t meet.

3. Tracking too many fields, learning nothing

The temptation on a new org is to flip every field history checkbox. Don’t. Tracked fields generate noise that buries the signal during an investigation. Classify your fields first, then track the ones that map to your compliance scope — PII, financial data, status fields tied to approvals, ownership and access fields.

4. Forgetting to add the History related list

Enabling Field History Tracking writes to the history object, but users won’t see the data unless the {Object} History related list is added to the page layout. Easy to miss; embarrassing to explain to an auditor.

5. Treating Health Check as a one-time gauge

Configuration drifts. A 95 today can be an 82 in three months as new users, profiles, and integrations land. Schedule Health Check runs and trend the score over time — that trend is far more meaningful to auditors than a single snapshot.

6. Ignoring Event Monitoring because it’s “too technical”

Event Log Files are CSVs. They open in Excel. Even without a SIEM, a weekly review of ReportExport events catches an enormous fraction of insider data exfiltration. The barrier to entry is much lower than the documentation makes it look.

10 high-yield exam facts

  1. Setup Audit Trail retention — 180 days. UI shows 20 most recent entries; full window via CSV export. No native extension.
  2. Field History Tracking limits — 20 fields per object, 18 months UI / 24 months API. Does NOT count against data storage.
  3. Field Audit Trail (Shield) — 200 fields per object as of Spring ’26 (was 60 prior). Up to 10 years retention via HistoryRetentionPolicy. Archived to FieldHistoryArchive Big Object.
  4. Field types you cannot track — formula, roll-up summary, auto-number, long text area > 255 chars, system fields like CreatedBy.
  5. Login History retention — 6 months. Available natively; no Shield required. Stored in the LoginHistory standard object.
  6. Event Monitoring tiers — Free tier: limited event set, 24-hour generation, 1-day retention. Paid tier: 50+ event types, hourly generation, up to 1 year retention. Data lives in EventLogFile.
  7. Real-Time Event Monitoring — streams events via Streaming API, stores in Big Objects for 6 months. Enables Enhanced Transaction Security and ML-driven Threat Detection.
  8. Shield components (four) — Platform Encryption, Event Monitoring (with RTEM), Field Audit Trail, Data Detect. Can be purchased individually or as a bundle.
  9. Health Check — free native feature, 0–100 score, four risk tiers (High, Medium, Low, Informational). Salesforce Baseline Standard + up to 5 custom baselines.
  10. Data Classification fields — ComplianceGroup, DataSensitivityLevel, BusinessOwnerId, BusinessStatus. Queryable via the FieldDefinition Tooling API.

Test what you know

CertifySF practice exams cover audit, compliance, and Shield scenarios across the Admin, Advanced Admin, Security & Privacy Architect, and Identity & Access Management certifications.

Browse Practice Exams

Frequently asked questions

What’s the difference between Setup Audit Trail and Field History Tracking? ⌄

Setup Audit Trail logs configuration changes made in Setup — profile edits, permission set changes, field metadata updates, sharing rule changes, and similar. Field History Tracking logs data changes — when a value in a tracked field on a record is created, edited, or deleted. They are complementary: Setup Audit Trail tells you who changed the org, while Field History Tracking tells you who changed the data.

How long does Salesforce retain Setup Audit Trail data? ⌄

180 days (six months). The UI shows only the 20 most recent entries, but the full 180-day window can be exported as a CSV. After 180 days, entries are permanently deleted with no native option to extend retention. Most compliance frameworks require longer retention, so regularly exporting and archiving the CSV is a standard admin practice.

Do I need Salesforce Shield to track field changes? ⌄

No. Standard Field History Tracking is included in all editions that support it and lets you track up to 20 fields per object with 18 months of retention (24 months via API). Field Audit Trail — part of Salesforce Shield — extends this to 200 fields per object as of Spring ’26 and up to 10 years of retention. Use the standard feature for general auditing; add Field Audit Trail when regulations like SOX, HIPAA, or GDPR require multi-year retention.

What is the difference between Event Monitoring and Real-Time Event Monitoring? ⌄

Event Monitoring captures user activity in Event Log Files generated hourly or daily, written to the EventLogFile object. Real-Time Event Monitoring streams events in near real time via the Streaming API and stores them as Big Objects for up to six months. Real-Time Event Monitoring also enables Transaction Security policies (block, require MFA, or notify) and Threat Detection (ML-based anomaly identification). Both ship as part of Salesforce Shield.

Is Salesforce Health Check free? ⌄

Yes. Health Check is a native, no-cost feature in Setup that scores your org’s security settings (0 to 100) against the Salesforce Baseline Standard or up to five custom baselines. Security Center, which aggregates Health Check scores across multiple orgs, is a paid add-on.

Can I extend Login History beyond 6 months? ⌄

Not natively. Login History retains six months of data. To keep login data longer, either export the LoginHistory object regularly via API or CSV, or upgrade to Event Monitoring, which captures login data as Event Log Files retained for up to one year, or to Real-Time Event Monitoring, which streams LoginEvent records into Big Object storage.

All information verified against the official Salesforce Spring ’26 Security Guide, Field Audit Trail Implementation Guide, and Spring ’26 Release Notes. Study smarter at CertifySF.com.

Shopping Cart