Print this page

Custom fields no longer exposed on User object when querying via Tooling API from Summer '15

Knowledge Article Number 000220030
Description Prior to the Summer '15 release, customer's had the ability to retrieve custom fields when querying the User object in the Tooling API via a REST call as follows:


The REST call would receive a response as follows:

HTTP/1.1 200 OK 
Date: Tue, 12 May 2015 11:15:48 GMT 
Set-Cookie: BrowserId=ZI_-6FaOTzey2qmEyYGkCg;Path=/;;Expires=Sat, 11-Jul-2015 11:15:48 GMT 
Expires: Thu, 01 Jan 1970 00:00:00 GMT 
Sforce-Limit-Info: api-usage=7/15000 
Content-Type: application/json;charset=UTF-8 
Content-Encoding: gzip 
Transfer-Encoding: chunked 

"size" : 1, 
"totalSize" : 1, 
"done" : true, 
"queryLocator" : null, 
"entityTypeName" : "User", 
"records" : [ { 
"attributes" : { 
"type" : "User", 
"url" : "/services/data/v33.0/tooling/sobjects/User/<userID>" 
"Id" : "<userID>", 
"<custom_field_API_name>" : "Joe Bloggs" 
} ] 

However, since the release of Summer '15, the call will fail with a response as follows:

[ { 
"message" : "\nSELECT Id,<custom_field_API_name> FROM User WHERE ID='<userID>'\n ^\nERROR at Row:1:Column:11\nNo such column '<custom_field_API_name>' on entity 'User'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.", 
"errorCode" : "INVALID_FIELD" 
} ]
Resolution The ability to retrieve custom fields from the User object via Tooling API was never intentional and also never documented in the Tooling API guide detailing the User object. This behaviour has been corrected in the Summer '15 release. Only a select number of fields are currently exposed via the Tooling API (ID, FirstName, LastName, Name, Username, & WorkspaceId). Customers should use the normal Salesforce REST API as an alternative.

promote demote