2

I am trying to add a "Customer Community Plus User" profile user with the Salesforce .Net api. I have not done any configuration changes to this profile.

//Try to add user with a contact
Salesforce.Common.Models.SuccessResponse responseMsg = await client.CreateAsync("User", user);  

I manage to add other profile types such as Chatter Free users via the api. But here I am getting "No access to portal" error. What is this issue? Do I need to do any configuration changes in the Salesforce portal for this profile?

2

Customer Community Plus User is not similar to other profiles .

These users are Contact records within salesforce who can access a Portal or community .To create these Users you need to have atleast a Portal or community(Its some set up inside your salesforce ) which has access to the Profile you are trying to assign .

The key thing will be you will need a Contact record Id from the salesforce before you create these users .You will link user.ContactId = ContactId (Contact record Id will be mapped to the Users COntactId).

Also another key things to consider will be

The Account linked to the contact has a owner field and owner needs to have a valid role to allow you to create the User .

2
  • Thanks,have a different question which I guess relates to this one. Is this the same reason that this license type/profile types not available in Salesforce Set Up->Manage User-> New User UI. Do you know what is the criteria used to load license types+profiles in the Add New User UI in Salesforce? Because I am developing a web app to add users via the api. Currently I display all license types available for the user. It seems like I need to restrict the license types I am displaying. Now sure whats the filter I need to use there. – Dhanuka777 Feb 1 '16 at 4:28
  • Yes it really makes sense to restrict these.It requires a community set up – Mohith Shrivastava Feb 1 '16 at 5:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.