Sub topic 18
Troubleshooting: why does this user have (or lack) access?
This chapter assumes you know profiles, permission sets, permission set groups, muting, and the difference between object permissions and record sharing. It gives you a repeatable method for answering "why can (or can't) this user do X?" and covers the errors people make most often.
The working model
A user's effective permissions are the union of everything granted to them, minus anything muted inside a group. Salesforce combines three sources:
- The user's one profile.
- Every permission set assigned directly to the user.
- Every permission set group assigned to the user. Each group contributes its permission sets, minus its muting permission set.
Access is additive across sources. A permission granted by any source is granted, unless a muting permission set in a group removes it from that group's contribution. Muting affects only the group it sits in. If the same permission arrives through a profile or a directly assigned permission set, the user still has it.
Object and field access is only one layer. Record access comes from sharing, which is a separate check. Most "I can't see the record" tickets are sharing problems, and most "I can't see the field" tickets are field-level security problems. Sorting a ticket into the right layer first saves time.
A diagnostic procedure
Work through these steps in order. Stop when you find the cause.
1. Name the exact permission
"She can't use Accounts" is too vague. Decide whether it is Read on the Account object, Edit on Account.AnnualRevenue, a system permission such as Export Reports, or visibility of a record. Each has a different source of truth.
2. Confirm which sources apply to the user
Open the user record and review the profile, the Permission Set Assignments related list, and the Permission Set Group Assignments related list. Remember that a group can be assigned and still contribute nothing if it is not active.
You can list non-profile assignments with SOQL:
SELECT Assignee.Name, PermissionSet.Name, PermissionSet.Label
FROM PermissionSetAssignment
WHERE PermissionSet.IsOwnedByProfile = false
ORDER BY Assignee.NameThe filter on IsOwnedByProfile removes the hidden permission set Salesforce keeps for each profile. Remove the filter if you want to see the profile too.
To narrow the query to one user, add a condition on the assignee:
SELECT PermissionSet.Name, PermissionSet.Label, PermissionSetGroupId
FROM PermissionSetAssignment
WHERE Assignee.Username = '[email protected]'
AND PermissionSet.IsOwnedByProfile = falseA permission set that arrived through a group shows a value in PermissionSetGroupId. A directly assigned one has it empty. This distinction tells you whether to fix the group or the user's own assignment.
3. Check each source for the permission
Check the profile, then each permission set, then each group's included sets. Do this for the specific permission you named in step 1. In Setup, the permission set and profile pages have a search box for object and system permissions, which is faster than scrolling.
If a permission is granted by several sources, removing it from one source changes nothing. This is the most common reason an "I removed access but the user still has it" fix fails.
4. Check group status
A permission set group has a status. Only Updated means the combined permissions are current.
| Status | Meaning | What to do |
|---|---|---|
| Updated | Combined permissions are current | Nothing |
| Updating | Salesforce is recalculating | Wait, then re-test |
| Outdated | A member set changed and the group has not been recalculated | Wait or let the recalculation finish. Check again |
| Failed | Recalculation failed | Open the group, review the error, and save it again |
If a user lacks a permission the group should give, an Updating or Failed status is a prime suspect.
5. Check for muting
If the group's permission sets grant the permission but the user lacks it, open the group's muting permission set. Muting is applied only inside that group. Look for the permission there. To restore it, remove it from the muting set rather than editing the underlying permission set, which may be shared by other groups.
6. Check licenses
A permission set can only grant what the user's license allows. A user license sets the ceiling for a profile. A permission set license adds specific feature permissions. If a permission cannot be enabled, or an assignment fails, check that the user has the required license first.
7. Check record-level access
If object and field access are correct but one record is hidden, the cause is sharing. Check the org-wide default for the object, the user's role, sharing rules, teams, and manual shares. Two exceptions skip sharing: View All and Modify All on the object, and the View All Data and Modify All Data system permissions. If a user can see every record, look for one of those.
Worked scenario: access that should not exist
A support agent can delete Cases, and nobody remembers granting it. The steps:
- Name the permission: Delete on Case.
- Query the assignments for the agent. The result shows one permission set group,
Support_Agent, and a directly assigned set,Case_Cleanup. - Open
Case_Cleanup. It grants Delete on Case. It was assigned for a one-time data cleanup and never removed. - Remove the assignment. Re-test.
Had the delete right come from the profile, removing Case_Cleanup would not have helped. That is why step 3 checks every source, not just the first one that grants the permission.
Using custom permissions to check from code
When a feature is gated by a custom permission, test it directly as the affected user. This Apex check returns true if any profile, permission set, or group gives the running user that permission:
if (FeatureManagement.checkPermission('Approve_Discounts')) {
// Show or run the discount approval logic
} else {
// Hide the feature or return an error
}It evaluates the running user, so run it in a context that matches the reported problem, not as an admin.
Common errors
- Editing the wrong layer. Granting Read on an object does not reveal records the user's sharing blocks.
- Forgetting the profile. The profile still contributes, even in a permission-set-led model with a Minimum Access profile. Check it anyway.
- Assuming muting is global. Muting affects one group's contribution only.
- Ignoring recalculation. A change to a member permission set is not effective for the group until the group returns to
Updated. - Removing from one source only. Another source may still grant the permission.
- Profile-only settings. Default app, login hours, and login IP ranges live on the profile. A permission set cannot change them.
Exercise
A user is assigned the permission set group SalesRep, which includes the set OpportunityEditor. Opportunity_Editor grants Delete on Opportunity, but the group's muting permission set removes Delete. The user still deletes Opportunities. Give two possible causes and how you would confirm each.
Show answer
The permission can come from another source, because muting only removes it from this group's contribution. Cause one: the user's profile grants Delete on Opportunity. Confirm by checking the profile's object settings. Cause two: another directly assigned permission set or another group grants Delete. Confirm by querying PermissionSetAssignment for the user and checking each set. A third possibility is that the user has Modify All on Opportunity or Modify All Data, which also allows deletion. Remove the permission from every other source to close the gap.