The independent daily for Salesforce admins, developers and architects

Curated by Abhinav (opens in a new tab)

Recommended

Design a Salesforce security model around user personas (opens in a new tab)

You will learn how to map business personas to a User Field, a Custom Metadata Type, a Permission Set Group and Apex automation, so access stays consistent as features are added.

Why read this

The piece also explains when to use functional versus persona-based Permission Sets and why Profiles should be kept minimal.

  1. Persona set on User record
  2. Custom Metadata Type maps persona
  3. Permission Set Group for persona
  4. Permission Sets grant access
  5. Apex assigns access on save
How a persona assigns a user's access, from the User record through to Apex

The article argues that Salesforce security models often become a fragmented patchwork, and that features can fail on release because users lack the access they need. Its remedy is to build the security model around personas: groups of users who share a functional role and baseline access. The business defines which persona needs which access (create, read, edit, delete) for a feature, and IT implements that access consistently, so the same framework can serve later releases. Shared understanding between IT and the business is treated as essential to making this work.

The approach rests on five pieces. A persona picklist on the User record, whose edits are tightly restricted to administrators, stores each user’s persona. A Custom Metadata Type acts as a maintainable mapping table from each persona to its profile, role, public groups and Permission Set Group, and automation fails if a persona lacks a mapping record. Each persona gets one Permission Set Group, which has no access of its own, so changing a persona’s access means changing its Permission Sets. Those Permission Sets can be organized either by functional capability, which suits features spanning many objects such as Field Service, or by persona, which suits cases with few personas and complex functions, such as a Partner Relationship Management Experience Cloud site. Temporary cross-role duties are handled through an approved exception process, such as an ITSM workflow, while permanent combined roles should become new personas.

The article also recommends keeping profiles minimal: each user gets a custom “Minimum Access” profile, one per license type, with most permissions moved to Permission Sets, since profiles are still needed only for edge cases such as page layouts, login hours and IP ranges. Assignment is automated with Apex through the organization’s trigger framework, which the author prefers over Flows for consistent performance at scale. For teams not ready for the full design, the author suggests starting with Permission Set Groups for the personas a feature and its successors will need, assigned manually at first, and adding the persona field and automation later. The article frames this as a way to meet the Salesforce Well-Architected Framework’s goals of scalability and predictability.

Read the original at Salesforce Architects (opens in a new tab)

Worth reading?