Concept 6 of 14Access and security

External sharing: OWD, sharing sets, share groups, roles and sharing rules

How external users get record access: external OWD, sharing sets for high-volume users, share groups, roles and sharing rules for Plus and Partner users, and implicit and Apex sharing.

Your confidence:Not rated

Simple explanation

External OWD (per object) must be equal to or more restrictive than the internal OWD. Start with Private.

For Customer Community (high-volume) users (no roles):

  • Sharing sets: grant access to records whose account or contact (or a related lookup) matches the user's account or contact, for example Cases where Case.AccountId = User.Contact.AccountId.
  • Share groups: share records owned by high-volume users with internal users or groups.
  • Records they own are visible to them.

For Customer Community Plus and Partner users:

  • Roles (account roles beneath the account owner's role) and sharing rules to and from portal roles and groups.
  • Sharing sets can also apply βš‘ verify licence coverage.

Other mechanisms: manual sharing, Apex managed sharing for complex relationships, and implicit sharing (for example access to a case gives read access to its account).

Design rule: keep high-volume customer access on sharing sets, and reserve roles for users who truly need hierarchy-based access.

Real-world analogy

A sharing set is a rule at the reception desk: "anyone from Company X can collect parcels addressed to Company X". Roles are office keys arranged by seniority, needed only where a company's managers must see their staff's work.

Worked example

Insurance customer portal: external OWD Private for Policy, Claim and Case. A sharing set gives users access to Policies and Claims where Policyholder__c = their contact, and Cases where AccountId = their account. A share group makes claims documents uploaded by customers visible to the claims team.

Diagram

Rendering diagram…

Key points

  • External OWD ≀ internal; start Private.
  • Sharing sets for high-volume customer users; share groups for records they own.
  • Roles and sharing rules for Plus and Partner users.
  • Apex managed sharing for relationships rules can't express.
  • Prefer sharing sets for scale; roles add sharing calculation cost.

Limits and gotchas

  • Sharing sets support specific objects and access paths; check that your lookup path is supported βš‘ verify.
  • Many portal roles (thousands of accounts Γ— three roles) make sharing recalculation slow; use the minimum roles per account.
  • Implicit sharing can expose parent account details; check what account fields external users can see (FLS).

🎀 How to say this in an interview

Always name the licence first, then the mechanism it supports. Interviewers reward choosing sharing sets for scale and explaining role-count impact.

Common follow-ups

A customer user needs to see cases of all contacts at their company. How?

A sharing set on Case using AccountId = the user's contact's AccountId. No roles are needed.

Why avoid roles for two million customers?

Each account with roles adds groups and share rows to recalculate; at that scale sharing calculations and storage grow significantly. Sharing sets avoid the role hierarchy.