What is Role Hierarchy in Salesforce?
Updated · By the Clientell AI team · How we write
The role hierarchy in Salesforce is a tree of roles that opens up record access. Users higher in the tree can see and edit the records owned by, or shared with, users below them. It does not give anyone access to more objects or fields. Profiles and permission sets do that. Roles only widen access to records.
Key facts
- What it does
- Gives users higher in the hierarchy the same record access as users below them
- What it does not do
- Grant object or field permissions. Those come from profiles and permission sets.
- Works with
- Organization-wide defaults, sharing rules and manual sharing
- Default role limit
- 500 roles per org. Orgs created in Spring '21 or later can create up to 5,000 (Salesforce Help).
- Maximum with a support request
- 10,000 roles (Salesforce Help)
- Recommended depth
- Salesforce recommends a maximum of 10 levels (Salesforce Help)
Clientell AI, the AI Salesforce admin, audits your Role Hierarchy setup in a read-only scan, then drafts the fixes. See permission management
Try it in Clientell AI
“Audit my Role Hierarchy setup: show where access is too open, list who has more than they need, and draft fixes for me to approve.”
Clientell AI reads your org first. Platform deployments include rollback. How security works.
What is the role hierarchy in Salesforce?
The role hierarchy works like an org chart for data access. Each user can be placed in one role. A user in a higher role gets the same access to records as users in the roles below.
Salesforce Help gives an example. Users in the Sales Manager role automatically see all records that Sales Reps own, or can access through sharing rules, manual sharing or other features (Salesforce Help). No sharing rule is needed to extend that access.
The hierarchy does not have to match your company org chart. Treat each role as a level of data that a group of users needs to see.
How do roles fit with org-wide defaults and sharing rules?
Record access in Salesforce is layered. Org-wide defaults set the floor. The role hierarchy is the first way to widen access. Sharing rules and manual sharing add more. Salesforce advises setting org-wide defaults to the most restrictive level any user needs, then opening access with the other tools (Salesforce Help).
| Layer | What it does |
|---|---|
| Organization-wide defaults | Set the baseline access to records a user does not own |
| Role hierarchy | Gives managers access to records owned by or shared with people below them |
| Sharing rules | Open access to groups of records for roles, groups or territories |
| Manual sharing | A user shares a single record with another user or group |
| Profiles and permission sets | Control object and field permissions, not which records a user can see |
What is the difference between a role and a profile?
People often mix these up. A role answers which records a user can see. A profile answers what a user can do with objects and fields, and sets default settings.
| Role | Profile | |
|---|---|---|
| Controls | Record visibility, through the hierarchy | Default apps, record types, page layouts, login hours, IP ranges and permissions |
| Per user | One role | Exactly one profile |
How do you create a role hierarchy in Salesforce?
Plan roles around data access first. Build in a sandbox if you are restructuring a live hierarchy.
- 1. Setup > Roles > Set Up Roles. Click Expand All to see the tree.
- 2. Click Add Role under the role that should sit above the new one.
- 3. Enter a Role Name, such as West Sales Manager, and save.
- 4. Setup > Users > Users. Open a user, set the Role field, and save.
- 5. Check: open a record owned by a West Sales Rep and click Sharing. The manager's role appears with access.
- To check the hierarchy later, return to Setup > Roles and open any role to see its users.
Can you turn off hierarchy access on an object?
For custom objects, yes. In Sharing Settings, deselect Grant Access Using Hierarchies on the object. You can only do this for custom objects whose default access is not Controlled by Parent. The setting cannot be changed for standard objects (Salesforce Help).
Access given to users through sharing sets is not extended to their superiors in the role hierarchy. Users can also reach records they do not own through other routes, such as the View All Data permission, sharing rules and manual sharing (Salesforce Help).
How many roles can a Salesforce org have, and what is best practice?
By default, a Salesforce org can have up to 500 roles. Support can raise this to a maximum of 10,000. In orgs created in Spring '21 or later, you can create up to 5,000 roles without asking (Salesforce Help).
Do not create a role for every user or mirror your org chart. Build roles around data access, and combine titles with the same access into one role. Too many nested roles can slow sharing recalculation. Keep the hierarchy to a maximum of 10 levels (Salesforce Help).
What are common role hierarchy mistakes?
Most problems come from treating roles like permissions.
- Expecting a role to grant object access. Fix: add the permission through a profile or permission set.
- Building one role per person. Fix: merge titles with the same data access into one role.
- Deep chains of nested roles. Fix: flatten the tree to the 10 levels Salesforce recommends (Salesforce Help).
- Assuming managers see private records. Fix: managers see records of people below them, not records of peers or other branches.
FAQ: Role Hierarchy in Salesforce
What is role hierarchy in Salesforce?
A tree of roles that gives users higher up the same record access as the users below them. It widens record access, never object or field permissions.
What is the difference between role and profile in Salesforce?
A role controls which records a user can see through the hierarchy. A profile controls default settings and object permissions. Every user has exactly one profile.
Does the role hierarchy give access to everything?
No. A manager gets access to records owned by or shared with the people below, and only on objects the manager already has permission to use.
How many roles can I have in Salesforce?
500 roles by default. Orgs created in Spring '21 or later can create up to 5,000, and Support can raise the limit to 10,000 (Salesforce Help).
How many levels should a role hierarchy have?
Salesforce recommends a maximum of 10 levels (Salesforce Help).
How do I check the role hierarchy in Salesforce?
Go to Setup > Roles > Set Up Roles and click Expand All. Open any role to see its users.
Sources: Salesforce Help: Controlling Access Using the Role Hierarchy, Salesforce Help: Control Who Sees What, Salesforce Help: Optimizing Sharing Performance, Salesforce Help: Increase the Maximum Number of Roles, Salesforce Help: Organization-Wide Sharing Defaults. Last reviewed .
Related Salesforce Terms
4 termsOrganization-Wide Defaults (OWD)
SecurityOWD (Organization-Wide Defaults) set the baseline record access for each object: Private, Public Read Only, Public Read/Write, or Controlled by Parent. Role hierarchy and sharing rules can only open access further, never close it.
Sharing Rule
SecurityA Sharing Rule in Salesforce automatically extends record access to specific groups of users beyond what Organization-Wide Defaults and the role hierarchy provide.
Profile
AdministrationA Profile in Salesforce defines the baseline set of permissions, page layout assignments, and system settings that apply to every user assigned to it.
Permission Set
AdministrationA Permission Set is a collection of permissions that can be assigned to users on top of their profile to grant additional access without changing the profile itself.
What should I read next?
More in Administration
View all →Salesforce Admin
A Salesforce Admin is the person responsible for configuring, maintaining, and optimizing a Salesforce org to meet an organization's business needs.
Profile
A Profile in Salesforce defines the baseline set of permissions, page layout assignments, and system settings that apply to every user assigned to it.
Permission Set
A Permission Set is a collection of permissions that can be assigned to users on top of their profile to grant additional access without changing the profile itself.
Sandbox
A Sandbox is an isolated copy of your Salesforce production org used for development, testing, and training without risking live data.
Try this on your own org
Start the 14-day free trial, no card. Clientell AI asks before it changes anything in production.
14-day free trial · No credit card required