"Sab kuch sabko dikhega, toh bharosa kaun karega?"
"If everyone can see everything, who will trust us?" Security is how a company keeps its customers' trust.
- Who can log in?
- Which objects?
- Which fields?
- Which records?
- Who changed what?
Step 12: Users and Security
You will create users for two real-world organisations, then decide exactly what each person can do and see, using profiles, permission sets, roles, public groups, organisation-wide defaults, sharing rules, teams and manual sharing.
You are hereSteps 1-4 Requirements and configurationSteps 5-9 DevelopmentSteps 10-11 Test and deploySteps 12-15 Rollout
Hook: two incidents that never should have happened
| Company | What happened | What was missing |
|---|---|---|
| A car dealership | A consultant who had resigned exported 8,000 customer records the evening before he joined a rival dealer. | Every consultant could see every customer and export reports. His user wasn't frozen on his last day. |
| An insurer | A motor claims agent opened a well-known actor's health claim out of curiosity. The story reached social media. | Health claims were visible to everyone in the contact centre, and nobody tracked who viewed them. |
Both companies had Salesforce. Neither had designed its security. In this workbook you design it on purpose, so that every person sees exactly what their job needs.
By the end of this workbook, you will be able to
- Create, freeze and deactivate users, and choose the right licence, profile and role.
- Explain the four layers of Salesforce security and which tool controls each.
- Use profiles, permission sets, permission set groups and muting permission sets.
- Set organisation-wide defaults and open access with roles, public groups, sharing rules, teams and manual sharing.
- Narrow access with restriction rules, and protect sensitive fields.
- Use login, session, MFA and audit features, and troubleshoot "why can't she see this?"
Concept: the four layers
Every security question in Salesforce falls into one of four layers. Answer them in this order.
1. Users
Every person who logs in is a User. A user record carries the settings below.
The user lifecycle
2. Profiles, permission sets and permission set groups
Object permissions
3. Field-level security
Covered fully in Step 4: for each field, a user has no access, read only, or read and edit. Grant it through permission sets. It applies everywhere, including reports, list views and the API, so it is the right way to protect sensitive fields like medical details or discounts.
Record access in depth
Object permissions say "you may read Opportunities". Record access says "which Opportunities". Salesforce starts locked down and opens up step by step.
Organisation-wide defaults (OWD)
The baseline: what users can see of records they don't own. Set it as tight as the most restricted user needs, in Setup > Sharing Settings.
There is a separate external default for Experience Cloud users, which can be the same or stricter. For custom objects you can untick Grant Access Using Hierarchies; for standard objects it is always on.
Role hierarchy
Users higher in the hierarchy get the same access as the record owner on records owned by people below them. Roles describe reporting lines for data, not job titles, so keep the tree simple. A role controls which records you see; a profile or permission set controls what you can do.
Public groups
A named set of users, roles, roles and subordinates, or other groups. Use them as targets for sharing rules, manual sharing, list views and folders, such as "F&I Team" or "Health Claims Team".
Sharing rules
Teams, manual sharing and implicit sharing
Narrowing access: restriction and scoping rules
Try it: who can see Priya's opportunity?
The opportunity "Priya: Ranger ZX" is owned by Arjun, a consultant at Kondapur. Change the settings and see who gets what access, and why.
The roles behind the simulator
Other security features
Beyond who sees what: how people log in, how long sessions last, and how you prove what happened.
Demo: Kaveri Motors
Watch the full security design for the dealership from CRM 2, in Org C.
Users
Role hierarchy
Profiles, permission sets and groups
Organisation-wide defaults
Public groups and sharing rules
Other controls
Build it in Org C
- Roles: in Setup > Roles, build the tree above if CRM 2 didn't already.
- Profile: clone your licence's standard profile as Kaveri Base. Keep it lean: default app Sales, page layout assignments, login hours 8 AM to 9 PM for consultants. Remove "Export Reports".
- Permission sets: create the permission sets in the table, with their object, field and user permissions.
- Permission set groups: create Sales Consultant and Showroom Manager from them. In Showroom Manager, add a muting permission set that removes Delete on Opportunity.
- Users: create the users, within your licence count. Assign Kaveri Base, a role, and the right permission set group. Set the Manager field for approvals.
- OWD: set the defaults in the table in Sharing Settings. Wait for the sharing recalculation email.
- Groups and rules: create the public groups, then the sharing rules.
- Teams: confirm Opportunity Teams are on (CRM 2), with Read/Write for the F&I role.
- Session and login: set session timeout to 2 hours in Session Settings; check MFA for UI logins in Identity Verification.
- Audit: turn on Field History Tracking for Opportunity Stage, Amount and Discount.
- Prove it: log in as Arjun, Meera, Kavitha, Farhan and Divya, and check the visibility tests in Exercise 1.
Practice: Suraksha General Insurance
Now you design security for the insurer from CRM 3, in Org D, with support. Health data makes this harder and more important.
Users
Requirements
Exercise 2 asks you to design and build the security for these. Try it before opening the model answer.
Open the Suraksha model answer after you finish Exercise 2
Three exercises
Exercise 1: Prove Kaveri Motors' visibility
First predict each answer. Then log in as each user in Org C and check.
Record what you actually saw, and fix anything that didn't match, in your Security Pack.
Exercise 2: Design Suraksha's security from requirements
For each requirement above, choose the main tool. Then build it in Org D and compare with the model answer.
Exercise 3: Solve the support tickets
Real admins spend much of their time answering "why can't I see this?" Pick the most likely cause for each ticket. In the org, use the Sharing Hierarchy button on a record to see who has access and why.
Build your Security Pack
Document each decision and how you tested it. A security design nobody can explain is a risk. Your work saves in this browser on this device.
Build with AI
AI is useful for reviewing a sharing design and for writing test cases. You still prove every access decision by logging in as the user.
Reflect and exit check
Quick test
Exit check: are you ready for Step 13?
Interview preparation
Security questions appear in almost every Salesforce interview. Practise saying these aloud, then use our AI interview agents for feedback.
For your resume and portfolio
Trainer notes
Open the suggested session plan and coaching notes
| Session | Cover | Students leave with |
|---|---|---|
| 1 (90 min) | Hook, four layers, users, profiles and permission sets. Create users live. | Kaveri users and permission set groups |
| 2 (90 min) | Record access: OWD, roles, groups, rules, teams, manual. Simulator until everyone predicts correctly. | Kaveri sharing model built |
| 3 (90 min) | Other security features. Exercise 1 in pairs, logging in as each user. | Exercise 1 recorded |
| 4 (90 min) | Suraksha requirements, Exercise 2 design debate, then Exercise 3 tickets. | Suraksha built, reflection and exit check |
Common mistakes to catch
- Confusing roles and profiles. Ask: "Is this about which records, or what actions?"
- Setting OWD to Public to fix one person's problem. Ask who else just gained access.
- Granting View All Data or Modify All Data to solve a visibility ticket.
- Forgetting that manual shares disappear when the record owner changes.
- Testing as the admin, who sees everything.
Licence limits
Developer Edition has few user licences. Plan which users each student creates, and reuse test users by changing role and permission sets between tests.
Check before each batch
Restriction rules, User Access Policies and permission set features change between releases. Confirm what your Developer Edition supports, and recheck Salesforce's guidance on profiles and permission sets.