1

I want to know which sharing rules (OWD) are relevant for each user. In order to do that, I need to know if user is internal or external. How can i get this info using SOAP API?

1

You can use the UserType field on User, see here:

The category of user license. Each UserType is associated with one or more UserLicense records. Each UserLicense is associated with one or more profiles. In API version 10.0 and later, valid values include:

  • Standard: user license. This user type also includes Salesforce Platform and Salesforce Platform One user licenses. Label is Standard.

  • PowerPartner: User whose access is limited because he or she is a partner and typically accesses the application through a partner portal or community. Label is Partner.

  • CSPLitePortal: user whose access is limited because he or she is an organization's customer and accesses the application through
    aCustomer Portal or community. Label is High Volume Portal.

  • CustomerSuccess: user whose access is limited because he or she is an organization's customer and accesses the application through a
    Customer Portal. Label is Customer Portal User.

  • PowerCustomerSuccess: user whose access is limited because he or she is an organization's customer and accesses the application through a Customer Portal. Label is Customer Portal Manager. Users with this license type can view and edit data they directly own or data owned by or shared with users below them in the Customer Portal role hierarchy.

  • CsnOnly: user whose access to the application is limited to Chatter. This user type includes Chatter Free and Chatter moderator users. Label is Chatter Free.

  • So, which of these indicate an external user? Are you sure that's the right field? – Adrian Larson Aug 18 '16 at 12:57
  • PowerPartner, CSPLitePortal, CustomerSuccess, PowerCustomerSuccess are all kinds of portal users. Standard and CsnOnly are internal users. I'm pretty sure that's right - that's what I've used in my projects. In my cases, it was a simple Community, and external users were only CSPLitePortal. – Aidan Aug 18 '16 at 15:11

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.