Skip to main content

Hi Everyone,

I have an Experience Cloud site where the users are using the Customer Community Plus license.

I have a requirement to create a new Customer Community Plus user from an LWC/Apex component. As part of the user creation process, I need to select the appropriate Customer Community Plus Profile.

To populate the Profile selection, I need to fetch the available Profiles from the org using Apex.

I tried the following SOQL:

List<Profile> profiles = [

SELECT Id, Name

FROM Profile

];

However, when this code executes in the context of a Customer Community Plus user, I receive the following error:

sObject type 'Profile' is not supported

I also understand that Experience Cloud users have restrictions on accessing certain standard objects.

My questions are:

  1. Is there any way to grant a Customer Community Plus user access to the Profile sObject through a Profile, Permission Set, or any other Salesforce configuration?
  2. If direct access to the Profile object is not supported for Customer Community Plus users, what is the recommended Salesforce approach for retrieving the appropriate Customer Community Plus Profile when creating another user?
  3. Is there any supported Apex/API approach to retrieve the available Customer Community Plus Profiles without directly querying the Profile object?

My requirement is specifically:

Existing Customer Community Plus user → LWC/Apex → Create a new Customer Community Plus user → Select the appropriate Customer Community Plus Profile

Any guidance or recommended approach would be greatly appreciated.

Thanks! 

 

#Salesforce Developer  #LWC  #Profiles  #Experience Cloud

0/9000