Sub topic 12
External Org-wide Defaults for Experience Cloud Users
This chapter assumes you know internal org-wide defaults (OWD), the Private, Public Read Only and Public Read/Write levels, and how the role hierarchy grants access upward. It covers the separate baseline Salesforce applies to external users, such as customers and partners who sign in through an Experience Cloud site or a portal.
Why a second baseline exists
Internal users and external users are usually very different groups. Employees may need to see every account. A customer should see only their own account, their own cases and the contacts at their own company.
If one OWD setting controlled both groups, opening an object to employees would also open it to every customer. Salesforce avoids this by giving each object two settings:
- Default Internal Access applies to employees and other internal users.
- Default External Access applies to external users, such as Customer Community, Partner Community and portal users, and to guest users.
You find both in Setup under Sharing Settings, in the Organization-Wide Defaults section. This section appears when the external sharing model is enabled. Once it is enabled, every object that supports it shows two columns.
The key rule: external access cannot exceed internal access
Salesforce enforces one constraint. The external setting must be the same as the internal setting or more restrictive. It can never be more open.
| Default Internal Access | Allowed Default External Access |
|---|---|
| Public Read/Write | Public Read/Write, Public Read Only, Private |
| Public Read Only | Public Read Only, Private |
| Private | Private |
The reason is trust. Employees are assumed to be more trusted than outside users. If customers could see more records than employees, the model would make no sense. An object that is Private internally is therefore always Private externally.
The rule also lets you open an object to employees without opening it to customers. For example, Account can be Public Read Only internally and Private externally. Sales staff can then browse all accounts, while each customer sees only their own.
What Private means for an external user
With external OWD set to Private, an external user can see only these records:
- Records they own.
- Records shared with them through a sharing set, share group, sharing rule, manual share or team.
- Records that they can reach through the external role hierarchy, in some cases (see below).
- Records related to their own account or contact, depending on the object and the access mechanism in use.
External users do not see records owned by other external users. This holds even for users who belong to the same company, unless one of the mechanisms above applies.
Access mechanisms for external users
Role hierarchy and sharing rules work for external users, but they behave differently from the internal case. Three points matter.
External roles are limited
When an external user is created, Salesforce can assign roles under the account. Customer Community users do not have roles. Partner Community and Customer Community Plus users can have up to three roles per account: Executive, Manager and User. These roles sit in a hierarchy below the account owner's role.
Two consequences follow:
- A Partner Community Manager can see records owned by users below them at the same account, if Grant Access Using Hierarchies is on for the object.
- External roles never give access to records owned by other accounts' users, and never give access upward into the internal hierarchy.
Customer Community users (the high-volume type) have no roles. They rely on other mechanisms.
Sharing sets
A sharing set gives high-volume portal users access to records based on a link between the user and the record, typically through the user's contact or account. For example, a sharing set can say: "Give each Customer Community user access to cases whose Account matches the user's Account."
Key properties:
- Sharing sets are configured per Experience Cloud site, in the site's Workspaces under Administration, then Login & Registration or Sharing Sets in the community settings.
- They apply to high-volume users, who do not have roles and are not covered by sharing rules.
- They grant access without writing share rows, so they scale to very large numbers of users.
Share groups and sharing rules
For Customer Community Plus and Partner Community users, you can use sharing rules. Rules can share records to groups, including share groups. A share group lets you give users from one external account access to records owned by other users in that same account, or to a set of internal records.
Diagram: how external users get access
Worked example
A company sells equipment and runs a Customer Community Plus site. Their requirements are:
- Employees can view all accounts but not edit accounts they do not own.
- Customers see only their own account.
- Customers see only cases for their own account.
The settings:
| Object | Default Internal Access | Default External Access |
|---|---|---|
| Account and Contract | Public Read Only | Private |
| Contact | Controlled by Parent | Controlled by Parent |
| Case | Private | Private |
For Case, the company then adds a sharing rule that shares cases with the external users who belong to the same account. An external user in Account A can read cases for Account A. The same user sees nothing for Account B.
For Account, the external user can still see their own account. Salesforce provides this implicitly for external users, because the account is the one linked to their contact.
Guest users
Unauthenticated visitors to a public site are guest users. They are external users and use the external OWD, but with further limits:
- Guest users cannot own records through standard ownership in most cases. Records they create are owned by a default owner that you choose.
- Guest user profiles have no View All or Modify All permissions.
- Salesforce restricts guest access to record sharing: you use guest user sharing rules, which can only give Read Only access.
Treat guest access as public. Anything you open to the guest user is readable by anyone on the internet who can reach the site.
Common errors
- External setting greyed out or limited. The external option cannot be more open than the internal one. Change the internal OWD first.
- Customers see nothing after launch. The external default is Private and no sharing set or rule has been created. Test with Log in to Experience as User.
- Customers see too much. The external default was set to Public Read Only on a convenience basis. Move it back to Private and add narrow rules.
- Role hierarchy surprises. Customer Community users have no roles, so hierarchy-based access never applies to them.
- Slow sharing recalculation. Changing external OWD triggers a recalculation of sharing for the object. Plan the change for a quiet period.
Checking external access
Use the same inspection tools as for internal users. This query shows whether an external user can read and edit a given record after all sharing mechanisms apply:
SELECT RecordId, HasReadAccess, HasEditAccess, HasDeleteAccess
FROM UserRecordAccess
WHERE UserId = '005XXXXXXXXXXXXXXX'
AND RecordId = '001XXXXXXXXXXXXXXX'Replace the IDs with the external user's ID and the record's ID. To see why access exists, query the share table and look at RowCause:
SELECT Id, AccountId, UserOrGroupId, AccountAccessLevel, RowCause
FROM AccountShare
WHERE AccountId = '001XXXXXXXXXXXXXXX'Note that sharing sets and some implicit access paths do not always appear as rows in the share table. A user can have access that the query does not explain, so use UserRecordAccess as the final answer.
Design guidance
- Enable the external sharing model before you add external users, so the baseline is set from the start.
- Set external OWD to Private for every object that holds customer data.
- Keep the internal setting as open as employees actually need, then restrict the external one.
- Use sharing sets for high-volume users and sharing rules for users with roles.
- Test with a real external user for each license type, not only as an administrator.
Exercise
An object has Default Internal Access set to Public Read Only. A colleague wants Default External Access set to Public Read/Write so partners can edit records. Can they do this? What should they do instead if partners need to edit some records?
Show answer
No. External access cannot be more open than internal access, so with Public Read Only internally the external setting can be Public Read Only or Private at most. To let partners edit some records, keep the external default at Private (or Public Read Only) and add a sharing rule or sharing set that grants Read/Write access to the specific records those partners need.
Exercise
A Customer Community user reports that they cannot see a case owned by a colleague at the same company. External OWD for Case is Private. Name two mechanisms that could fix this without changing OWD, and one that will not work.
Show answer
A sharing set that matches the user's account to the case's account, or a sharing rule or share group that shares the cases with the account's external users, would both work. Relying on the role hierarchy will not work, because Customer Community users do not have roles.