Skip to content
Tutorials Center
My learning

Topics

Lesson 18 of 36 ยท Security and Access

Field-Level Security, Login Controls and Authentication

Restrict sensitive fields with field-level security, then lock down logins: password policies, multi-factor authentication, IP ranges, login hours, SSO and session settings.

This lesson covers the two outer layers of the security model: field-level security, which hides or protects individual fields, and org access controls, which decide who can log in and how. It finishes with monitoring tools.

Field-level security (FLS)

Field-level security sets each field to Visible (Read) and Read-Only/editable for each profile and permission set. A field with no visibility for a user is gone for them: it does not show on layouts, reports, list views, search, or the API.

Setting FLS

  • When creating a field: step 3 of the field wizard sets visibility for profiles. Choose carefully; the default may make it visible to everyone.
  • On an existing field: Object Manager > object > Fields & Relationships > the field > Set Field-Level Security (a grid of profiles with Visible and Read-Only boxes).
  • In bulk, per profile or permission set: edit the profile/permission set and use Field Permissions or Object Settings.
  • Field Accessibility Viewer (Setup): shows who can access a field.

Rules:

  • FLS applies everywhere the field is used, unlike a page layout which only hides it on that layout.
  • Read on an object does not mean Read on all fields. Both must be granted.
  • A required field (required at definition level) is always visible and editable regardless of FLS to avoid saves that cannot succeed.
  • Standard fields can also be restricted (for example hide Annual Revenue).
  • Formula and roll-up values may show data derived from fields the user cannot see. If sensitive, restrict the formula field too.
Python Stand-in: FLS filters the fields a user receives

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The sensitive SSN__c is not visible to either profile, because neither was granted it. That default (no grant, no access) is why a new field needs a conscious FLS decision.

Protecting sensitive data further

  • Encrypted Text fields: stored encrypted and masked in the UI; cannot be used in filters or formulas.
  • Shield Platform Encryption (paid add-on): encrypts data at rest for many standard and custom fields while keeping features working.
  • Field history and audit trail: track changes to important fields.
  • Data Classification metadata: tag fields as Public, Internal, Confidential, Restricted for governance.
  • Avoid putting secrets in text fields at all; use a proper secure store.

Org access: who can log in

Passwords

Setup > Password Policies sets: password expiration (for example 90 days), length (minimum 8 up to 20), complexity (letters, numbers, special characters), history, lockout after failed attempts and lockout duration. Modern guidance prefers longer passwords and MFA over frequent forced changes.

Multi-factor authentication (MFA)

Salesforce requires MFA for logins to its products. Users prove identity with a second factor: the Salesforce Authenticator or another authenticator app (TOTP), a security key (FIDO2/WebAuthn), built-in biometrics, and others. Admins can require MFA for direct UI logins and for SSO logins through their identity provider. MFA is also one of the single most effective protections against account takeover.

Single sign-on (SSO)

With SSO, users authenticate at a company identity provider (such as Okta or Microsoft Entra ID) and Salesforce trusts it, usually through SAML or OpenID Connect. Benefits: one password, central offboarding, central MFA policy. Setup: configure My Domain, then Setup > Single Sign-On Settings (SAML) or an Auth. Provider (OpenID Connect) and map users by Federation ID.

IP restrictions and login hours

  • Login IP Ranges on a profile: users can only log in from addresses in the range. Outside, login is refused.
  • Network Access (org-wide Trusted IP Ranges): logins from these addresses skip the identity-confirmation step but still need passwords/MFA.
  • Login Hours on a profile: users cannot log in outside set days and times (existing sessions end).
  • Login Flows: a custom Flow that runs at login, for example to demand an extra step or show a policy.
Python Stand-in: login checks (hours, IP range and MFA)

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Session settings

Setup > Session Settings controls session timeout (for example 2 hours of inactivity), locking a session to the IP address, requiring secure connections (HTTPS), clickjack protection and cache behavior. A shorter timeout is safer for shared devices.

Freezing, deactivating and login access

  • Freeze a user to block login immediately without removing assignments. Freezing is allowed from the user's detail page.
  • Deactivate when someone leaves; they stop using a license. Reassign their records first.
  • Grant Login Access: users can allow admins (or support) to log in as them for troubleshooting, under Setup > Login Access Policies.

Monitoring and auditing

  • Login History (Setup > Quick Find: Login History): who logged in, when, from which IP, status, and browser. Downloadable up to a recent period.
  • Setup Audit Trail: 180 days of configuration changes.
  • Field History Tracking and Field Audit Trail: record changes.
  • Event Monitoring (paid): detailed user activity logs.
  • Health Check (Setup): a score of your security settings against the recommended baseline, with a one-click fix for risky ones.
  • Transaction Security and Threat Detection (paid): policies to alert or block risky behavior.

Security checklist for a new org

  1. Turn on MFA for everyone.
  2. Set the OWD to the most restrictive acceptable setting for each object.
  3. Use a minimum-access profile plus permission sets.
  4. Limit Modify All Data and View All Data to a handful of admins.
  5. Set password and session policies.
  6. Review Health Check and fix red items.
  7. Document who approves access requests.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What is the effect of making a field not visible through field-level security?

    FLS applies everywhere the field is used, unlike page layouts, which are only presentation.
  2. 2. Which control restricts logins to specific network addresses for a group of users?

    Login IP ranges on a profile refuse logins from outside the listed addresses.
  3. 3. What is single sign-on?

    SSO delegates authentication to an identity provider, usually with SAML or OpenID Connect.
  4. 4. A user leaves the company today. What is the best immediate action?

    Freezing blocks login right away; deactivation follows once the records and automation are reassigned.

Summary

  • Field-level security controls each field's visibility and editability for every place the field appears; new fields need a deliberate FLS choice.
  • Control logins with password policies, MFA, SSO, IP ranges, login hours and session settings.
  • Freeze, then deactivate leavers; audit with Login History, Setup Audit Trail and Health Check.
  • Security is the intersection of the layers: org, object, field and record.

Next: Flow Builder Overview: Flow Types and Elements