Skip to content

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

Side-by-side architecture showing how internal and external users each have separate role hierarchies and OWD settings while sharing the same sharing rules, permission sets, and FLS layer.
Figure 1. Internal and external users operate under separate role hierarchies and separate OWD settings, but converge at the sharing rules and FLS layer. This separation is why external OWD must be configured independently. Changing the internal OWD does not automatically secure external access.

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

LicenseData AccessSharing BehaviorRole HierarchyRecord OwnershipCost
Customer CommunityOwn records + sharedCommunity sharing rulesPortal roles (under Account)YesLowest
Customer Community PlusOwn + shared + reportsStandard sharing + community rulesFull portal role hierarchyYesMedium
Partner CommunityOwn + shared + reportingStandard sharing + partner rulesPartner role hierarchyYesMedium-High
External AppsOwn records + sharedCommunity sharing rulesPortal rolesYesLowest (API optimized)
ChannelSimilar to PartnerStandard sharing + partner rulesPartner role hierarchyYesMedium-High
Guest UserOnly what sharing rules grantGuest user sharing rules onlyNoneNoFree

License Selection Decision

Decision tree for selecting the correct Experience Cloud license based on authentication need, reporting requirements, partner status, and API usage patterns.
Figure 2. License selection determines sharing behavior, role hierarchy participation, and cost. Selecting Customer Community Plus when Community suffices adds unnecessary role hierarchy complexity and cost at scale. The license choice is an architectural decision, not just a commercial one.

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

Internal OWDAllowed External OWDWhy
PrivatePrivate onlyExternal cannot be less restrictive
Public Read OnlyPrivate or Public Read OnlyCan restrict external further
Public Read/WritePrivate, Public Read Only, or Public Read/WriteCan restrict external further

External OWD Defaults

When you change an internal OWD, the external OWD defaults to the same value. But if there are external users, the external OWD should almost always be MORE restrictive than the internal OWD. Review external OWD separately for every object.

External OWD Design Approach

Three-step process for setting External OWD per object, defaulting to Private and using sharing rules for any cross-account access that is genuinely needed.
Figure 3. External OWD is configured per object after internal OWD is set. The default answer to “should external users see each other’s records?” is almost always no. External users from different companies should be isolated, with sharing rules used only for documented exceptions.

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

Portal role hierarchies for partner and customer users attach beneath the Account owner's internal role, with implicit sharing connecting internal Account managers to external portal users.
Figure 4. Portal role hierarchies sit beneath the internal hierarchy, anchored to the Account owner. The implicit sharing connection means the Account Manager automatically sees portal users’ records. This is a key access pathway that must be accounted for when designing external user security.

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.

When the first community user is created on an Account, Salesforce automatically generates either one flat role or three hierarchical roles depending on the license type selected.
Figure 5. Portal role auto-creation is triggered by license type. Community Plus and Partner licenses create 3 roles per Account, meaning 10,000 partner accounts generate up to 30,000 portal roles. This role volume directly impacts sharing group maintenance time and is a key scaling consideration.

Role Volume at Scale

Each Account with community users generates up to 3 roles. An org with 10,000 partner accounts creates up to 30,000 portal roles. This bloats the role hierarchy and increases group membership table maintenance time. Use Customer Community (1 role) over Community Plus (3 roles) when hierarchy is not needed. Configure the number of customer roles (1-3) under Setup > Communities Settings.

Portal Role Hierarchy Levels

License TypeAvailable RolesDefault Roles
Customer Community1 role (flat)User
Customer Community Plus3 roles (Executive, Manager, User)All three created per Account
Partner Community3 roles (Executive, Manager, User)All three created per Account
External Apps1 role (flat)User

Community License Role Limitation

Customer Community (non-Plus) users do NOT participate in the portal role hierarchy. They are flat: each user can only see their own records plus records shared explicitly. This is by design for high-volume, low-cost scenarios. If a customer needs hierarchical visibility, use Customer Community Plus.

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

FeatureStandard Portal UsersHVCP Users
Share tablesUse standard share tablesUse separate sharing tables (optimized for scale)
Role hierarchyParticipate in portal hierarchyDo NOT participate in hierarchy
Sharing rulesOwnership + criteria-basedSharing sets + share groups
Record visibilityOWD + hierarchy + rulesOwn records + sharing sets only
ScaleModerate (thousands)Massive (millions)
PerformanceStandard sharing calculationOptimized; no hierarchy computation

Sharing Sets

Sharing Sets are the mechanism for granting HVCP users access to records beyond their own.

Sharing Set configuration showing how a lookup field on the target object is matched against the portal user's Account to grant record access without using standard sharing rules.
Figure 6. A Sharing Set grants HVCP users access to records by matching a lookup field on the target object to the user’s Account. This lookup-based matching is more scalable than standard sharing rules for millions of external users, but requires careful field selection to avoid cross-account data leakage.

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

How a Sharing Set evaluates record visibility for an HVCP portal user by comparing the target record's AccountId lookup to the portal user's own Account, granting access only on exact match.
Figure 7. Sharing Set evaluation is a simple Account ID comparison: the portal user’s Contact.AccountId must match the target record’s AccountId lookup field. Cases belonging to a different Account are never returned, enforcing tenant isolation without any explicit sharing rule configuration.

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.

MechanismDirectionPurpose
Sharing SetsGrant external users access to records”Portal users see their Account’s Cases”
Share GroupsGrant internal users access to HVCP records”Support agents see portal users’ Cases”

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

RestrictionDetailsSince
No record ownershipGuest users cannot own recordsAlways
Explicit sharing rules requiredMust use guest user sharing rules for any accessWinter ‘20
Secure guest user record accessRecords created by guests are owned by the site’s default ownerSpring ‘20
Object permissions must be explicitNo implicit access to any objectWinter ‘21
API access disabled by defaultGuest users cannot access APIs without explicit configurationSpring ‘21
View All / Modify All blockedCannot grant these permissions to guest usersAlways
Sharing rules limitedOnly criteria-based guest user sharing rulesWinter ‘21

Guest User Security is a CTA Red Flag

If the architecture exposes any data to unauthenticated users, the CTA board WILL probe this aggressively. You must justify every piece of data visible to guest users, explain the sharing rules, and demonstrate the principle of least privilege. Over-exposure of guest user data has caused real-world data breaches.

Guest User Architecture Pattern

Minimum-privilege guest user pattern where only explicitly criteria-based shared records are accessible, with all unnecessary object permissions, field access, and API access removed.
Figure 8. Guest user security follows strict explicit opt-in: every object, field, and sharing rule must be deliberately enabled. The default posture is deny everything. Guest users who can access any data represent a potential public data exposure because they are unauthenticated internet visitors.

Guest User Best Practices

  1. Audit guest user profiles quarterly. Permissions creep over time.
  2. Use criteria-based sharing rules only. Ownership-based rules are not available for guest users.
  3. Never expose PII to guest users. Even masked data is risky.
  4. Remove all unnecessary object permissions. Explicit opt-in only.
  5. Disable guest user API access unless there is a specific, documented need.
  6. Run Salesforce Health Check. It flags guest user security issues.

Community-Specific Sharing Rules

Experience Cloud supports additional sharing rule types specific to external users.

Sharing Rule Types for Communities

Rule TypeApplies ToBased OnUse Case
Ownership-basedAll external usersRecord owner’s role”Partner Executive’s records shared with Partner Managers”
Criteria-basedAll external usersField values”Cases with Status = Escalated shared with Partner Executives”
Guest user sharingGuest users onlyField values (criteria)“Knowledge Articles where IsPublished = true shared with guest users”
Sharing SetsHVCP usersLookup field match”Cases shared where Case.AccountId = User’s AccountId”

Portal Security Design Process

Nine-step sequential process for designing portal security, from identifying external user types through license selection, OWD, role hierarchy, sharing sets, guest lockdown, FLS, and user-type testing.
Figure 9. Portal security design must be sequential: license type determines sharing behavior, which constrains how OWD and sharing sets can be configured. Skipping step 9 (testing with each actual license type) is the most common cause of undetected external user data exposure before go-live.

Portal Security Anti-Patterns

Anti-PatternRiskCorrect Approach
Using internal OWD for external usersOver-exposure of data between accountsSet External OWD to Private separately
Giving guest users object permissions by defaultData breach; unauthenticated accessExplicit opt-in for every object
Using Customer Community Plus when Community sufficesUnnecessary cost and complexityStart with Community; upgrade only if reporting/hierarchy needed
Ignoring implicit sharing for portal usersPortal users see parent Account dataAudit implicit sharing paths
Not testing with each license typePermission gaps or over-exposureCreate test users for each license type
Sharing too much via Sharing SetsCross-account data leakageUse the narrowest lookup field match possible

Sources

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.