What would you accept as an authoritative answer here? Someone internal to Salesforce could look at the underlying implementation and see the why of it. The best I can do is look at the available documentation and WSDLs.
My assumption is that the internal values that Salesforce have for the User Type were manipulated when exposed via the SOAP based api to align with other areas in the API.
For example, the User.UserType field is a picklist, with the values of:
- Standard
- PowerPartner
- CSPLitePortal
- CustomerSuccess
- PowerCustomerSuccess
- CsnOnly
This makes it consistent with the getUserInfoResult.userType
field returned by getUserInfo()
.
Dropping the underscore and switching to pascel casing may have occured to improve WSDL compatibility with the xsd:enumeration values.
The same consideration hasn't been applied to the younger REST API UserInfo Endpoint Response. I suspect there you are seeing values that are closer to the internal Salesforce representation of the data. It would be interesting to check how these compare to the User.UserType exposed in the REST API.
For what it's worth, the query /services/data/v34.0/query/?q=Select+UserType+from+User
against the REST API
Returned:
"UserType" : "Standard"
"UserType" : "CsnOnly"
I didn't have a Power Partner user setup to test against.
A call to /services/data/v34.0/sobjects/User/describe
gives the UserType picklistValues as:
"picklistValues" : [ {
"active" : true,
"defaultValue" : false,
"label" : "Standard",
"validFor" : null,
"value" : "Standard"
}, {
"active" : true,
"defaultValue" : false,
"label" : "Partner",
"validFor" : null,
"value" : "PowerPartner"
}, {
"active" : true,
"defaultValue" : false,
"label" : "Customer Portal Manager",
"validFor" : null,
"value" : "PowerCustomerSuccess"
}, {
"active" : true,
"defaultValue" : false,
"label" : "Customer Portal User",
"validFor" : null,
"value" : "CustomerSuccess"
}, {
"active" : true,
"defaultValue" : false,
"label" : "Guest",
"validFor" : null,
"value" : "Guest"
}, {
"active" : true,
"defaultValue" : false,
"label" : "High Volume Portal",
"validFor" : null,
"value" : "CspLitePortal"
}, {
"active" : true,
"defaultValue" : false,
"label" : "CSN Only",
"validFor" : null,
"value" : "CsnOnly"
}, {
"active" : true,
"defaultValue" : false,
"label" : "Self Service",
"validFor" : null,
"value" : "SelfService"
} ],
Based on that, I'd say you've found a bug with the REST getUserInfo() call.