You are here:
Use a Shared Person Account Role for Site Users
Convert single-user accounts associated with sites to use a shared person account role. A shared person account role is one role that the platform creates and assigns to all external role-based users that are in a single-user account.
The PortalRole field in the User object is used to specify user roles.
- To use shared person account roles, enable account role optimization.
-
To update an Experience Cloud site user role and convert the user to the shared person
account role, use code as shown in this sample Apex code.
User u = new User(); u.Id = '<user id>'; u.PortalRole = 'PersonAccount'; update u;

