Portal & Community Security: Experience Cloud Access
Portal security, in the context of Experience Cloud (formerly Community Cloud), introduces a second layer of complexity to the Salesforce security model. External users (customers, partners, suppliers) have different license types, different sharing behavior, and different security constraints than internal users. Getting portal security wrong is a common CTA failure point because candidates apply internal security patterns to external user scenarios.
External User Architecture Overview
Section titled “External User Architecture Overview”External User License Types
Section titled “External User License Types”The license type determines what a user can do and how sharing works. Getting this wrong locks you into expensive upgrades later.
License Comparison
Section titled “License Comparison”| License | Data Access | Sharing Behavior | Role Hierarchy | Record Ownership | Cost |
|---|---|---|---|---|---|
| Customer Community | Own records + shared | Community sharing rules | Portal roles (under Account) | Yes | Lowest |
| Customer Community Plus | Own + shared + reports | Standard sharing + community rules | Full portal role hierarchy | Yes | Medium |
| Partner Community | Own + shared + reporting | Standard sharing + partner rules | Partner role hierarchy | Yes | Medium-High |
| External Apps | Own records + shared | Community sharing rules | Portal roles | Yes | Lowest (API optimized) |
| Channel | Similar to Partner | Standard sharing + partner rules | Partner role hierarchy | Yes | Medium-High |
| Guest User | Only what sharing rules grant | Guest user sharing rules only | None | No | Free |
License Selection Decision
Section titled “License Selection Decision”External OWD
Section titled “External OWD”Salesforce has separate OWD settings for external users. The External OWD can be the same as or more restrictive than the internal OWD, but never less restrictive.
Internal vs External OWD
Section titled “Internal vs External OWD”| Internal OWD | Allowed External OWD | Why |
|---|---|---|
| Private | Private only | External cannot be less restrictive |
| Public Read Only | Private or Public Read Only | Can restrict external further |
| Public Read/Write | Private, Public Read Only, or Public Read/Write | Can restrict external further |
External OWD Design Approach
Section titled “External OWD Design Approach”Portal Role Hierarchy
Section titled “Portal Role Hierarchy”External users have their own role hierarchy that sits beneath their Account in the internal role hierarchy. The structure differs between customer and partner portals.
Portal Role Hierarchy Structure
Section titled “Portal Role Hierarchy Structure”How Portal Roles Are Auto-Created
Section titled “How Portal Roles Are Auto-Created”When you create the first community user on an Account, Salesforce automatically generates portal roles for that Account. This auto-creation affects role hierarchy size and sharing calculations.
Portal Role Hierarchy Levels
Section titled “Portal Role Hierarchy Levels”| License Type | Available Roles | Default Roles |
|---|---|---|
| Customer Community | 1 role (flat) | User |
| Customer Community Plus | 3 roles (Executive, Manager, User) | All three created per Account |
| Partner Community | 3 roles (Executive, Manager, User) | All three created per Account |
| External Apps | 1 role (flat) | User |
High-Volume Customer Portal Users
Section titled “High-Volume Customer Portal Users”Customer Community and External Apps licenses inherently use the high-volume sharing architecture (sharing sets, share groups) regardless of user count. These users have special sharing behavior distinct from standard portal users.
HVCP Sharing Behavior
Section titled “HVCP Sharing Behavior”| Feature | Standard Portal Users | HVCP Users |
|---|---|---|
| Share tables | Use standard share tables | Use separate sharing tables (optimized for scale) |
| Role hierarchy | Participate in portal hierarchy | Do NOT participate in hierarchy |
| Sharing rules | Ownership + criteria-based | Sharing sets + share groups |
| Record visibility | OWD + hierarchy + rules | Own records + sharing sets only |
| Scale | Moderate (thousands) | Massive (millions) |
| Performance | Standard sharing calculation | Optimized; no hierarchy computation |
Sharing Sets
Section titled “Sharing Sets”Sharing Sets are the mechanism for granting HVCP users access to records beyond their own.
Example: A Sharing Set grants Customer Community users Read/Write access to Cases where Case.AccountId matches the user’s Contact.AccountId. This means portal users see Cases related to their own Account.
Sharing Set Data Flow
Section titled “Sharing Set Data Flow”Share Groups
Section titled “Share Groups”Share Groups grant internal users access to HVCP user records. This is the reverse direction: internal users needing to see portal users’ data.
| Mechanism | Direction | Purpose |
|---|---|---|
| Sharing Sets | Grant external users access to records | ”Portal users see their Account’s Cases” |
| Share Groups | Grant internal users access to HVCP records | ”Support agents see portal users’ Cases” |
Guest User Security
Section titled “Guest User Security”Guest users (unauthenticated visitors) have the most restricted access in Salesforce. Since 2020, Salesforce has progressively tightened guest user security.
Guest User Security Restrictions
Section titled “Guest User Security Restrictions”| Restriction | Details | Since |
|---|---|---|
| No record ownership | Guest users cannot own records | Always |
| Explicit sharing rules required | Must use guest user sharing rules for any access | Winter ‘20 |
| Secure guest user record access | Records created by guests are owned by the site’s default owner | Spring ‘20 |
| Object permissions must be explicit | No implicit access to any object | Winter ‘21 |
| API access disabled by default | Guest users cannot access APIs without explicit configuration | Spring ‘21 |
| View All / Modify All blocked | Cannot grant these permissions to guest users | Always |
| Sharing rules limited | Only criteria-based guest user sharing rules | Winter ‘21 |
Guest User Architecture Pattern
Section titled “Guest User Architecture Pattern”Guest User Best Practices
Section titled “Guest User Best Practices”- Audit guest user profiles quarterly. Permissions creep over time.
- Use criteria-based sharing rules only. Ownership-based rules are not available for guest users.
- Never expose PII to guest users. Even masked data is risky.
- Remove all unnecessary object permissions. Explicit opt-in only.
- Disable guest user API access unless there is a specific, documented need.
- Run Salesforce Health Check. It flags guest user security issues.
Community-Specific Sharing Rules
Section titled “Community-Specific Sharing Rules”Experience Cloud supports additional sharing rule types specific to external users.
Sharing Rule Types for Communities
Section titled “Sharing Rule Types for Communities”| Rule Type | Applies To | Based On | Use Case |
|---|---|---|---|
| Ownership-based | All external users | Record owner’s role | ”Partner Executive’s records shared with Partner Managers” |
| Criteria-based | All external users | Field values | ”Cases with Status = Escalated shared with Partner Executives” |
| Guest user sharing | Guest users only | Field values (criteria) | “Knowledge Articles where IsPublished = true shared with guest users” |
| Sharing Sets | HVCP users | Lookup field match | ”Cases shared where Case.AccountId = User’s AccountId” |
Portal Security Design Process
Section titled “Portal Security Design Process”Portal Security Anti-Patterns
Section titled “Portal Security Anti-Patterns”| Anti-Pattern | Risk | Correct Approach |
|---|---|---|
| Using internal OWD for external users | Over-exposure of data between accounts | Set External OWD to Private separately |
| Giving guest users object permissions by default | Data breach; unauthenticated access | Explicit opt-in for every object |
| Using Customer Community Plus when Community suffices | Unnecessary cost and complexity | Start with Community; upgrade only if reporting/hierarchy needed |
| Ignoring implicit sharing for portal users | Portal users see parent Account data | Audit implicit sharing paths |
| Not testing with each license type | Permission gaps or over-exposure | Create test users for each license type |
| Sharing too much via Sharing Sets | Cross-account data leakage | Use the narrowest lookup field match possible |
Related Topics
Section titled “Related Topics”- Sharing Model: internal sharing model is the foundation; portal extends it
- Identity & SSO: external user authentication and social sign-on
- Field & Object Security: external user profiles and permission sets
- Security Best Practices: portal-specific best practices
- Decision Guides: license and portal architecture decision trees
Sources
Section titled “Sources”- Salesforce Help: Experience Cloud Security
- Salesforce Help: External User Licenses
- Salesforce Help: Guest User Security
- Salesforce Help: Sharing Sets
- Salesforce Help: High-Volume Portal Users
- Salesforce Help: Partner User Roles
- Salesforce Help: Community Role Configuration
- Salesforce Architects: Experience Cloud Architecture
- Salesforce Security Guide: Guest User Best Practices
- Trailhead: Optimizing Role Hierarchy and Account Roles
Personal study notes for the Salesforce CTA exam. Content compiled from VJ's study notes, official Salesforce documentation, community sources, and online publicly available content, then organized and presented with AI assistance. Not affiliated with Salesforce. © 2025–2026 VJ Srivastava.