External and guest user access
Experience Cloud licences and their sharing models, external OWD, sharing sets and share groups, partner roles, and hardening guest (unauthenticated) access.
Simple explanation
External users (customers and partners on Experience Cloud) follow the same model with extra controls:
- External OWD per object, which must be equal to or more restrictive than the internal OWD.
- Licence types decide sharing features:
- Customer Community: high volume, no roles; access through sharing sets (records related to the user's account or contact) and share groups (records the user owns shared to internal users).
- Customer Community Plus and Partner Community: roles (up to a few per account), sharing rules and more β verify current role limits.
- Partner roles form a hierarchy under the partner account's owner, so channel managers see their partners' data.
Guest users (unauthenticated visitors) are the highest-risk users:
- Guest OWD is Private for all objects and can't be opened; access is granted only through guest user sharing rules (criteria-based, read-only).
- Guest users can't own records created through the site; records are assigned to a default internal owner.
- Give the guest profile minimal object and field access, no API access unless needed, and review the site's Apex classes (guest-accessible
@AuraEnabledmethods must not usewithout sharingcarelessly).
Real-world analogy
External access is a shopping centre. Registered customers have loyalty cards that open their own lockers (sharing sets). Partner shops have staff passes for their own stockroom (partner roles). Guests walking in off the street can see the public shop windows only (guest sharing rules), and anything they hand in at the counter becomes the centre's property, not theirs (default record owner).
Worked example
A customer portal for two million insurance customers:
- Customer Community licences (login-based); external OWD Private for Policy, Claim and Case.
- Sharing set: users see Policies and Claims where
Policyholder__c= their contact, and Cases on their account. - Guest pages: product information and a claim notification form; the form posts to an Apex method that validates input, creates the claim with a default owner, and returns only a reference number.
- Quarterly guest access review with the Security Health Check and a scan of guest-accessible Apex.
Diagram
Key points
- External OWD β€ internal OWD; separate design for external users.
- Licence decides features: sharing sets for high-volume customers, roles for Plus and Partner.
- Sharing sets and share groups for customer users.
- Guest users: Private OWD, guest sharing rules only, can't own records.
- Review guest-accessible Apex and permissions regularly.
- Plan licence costs (member vs login-based) with access needs.
Limits and gotchas
- A single Apex class accessible to guests with
without sharingcan expose data to the internet. Review every guest-accessible method. - Sharing sets don't work with roles-based licences in the same way; licence choice early matters.
- Account with many external users and records can cause sharing performance issues; spread external users across accounts where possible.
- Guest user record access settings have tightened over several releases; old sites may still have risky configurations.
π€ How to say this in an interview
Portal questions always include security. Name the licence, external OWD, sharing sets or roles, and guest hardening, and mention the risk of guest-accessible Apex.
Common follow-ups
A customer user should see cases of their whole company, not just their own. How?
A sharing set granting access to Cases where the case's AccountId matches the user's account, or Customer Community Plus with roles if more complex visibility is needed.
How do you let guests check their claim status safely?
Don't expose claim records to guests. Ask them to log in, or provide a status lookup via Apex that requires a reference number plus a verification factor and returns only minimal status information.