Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way from the SOAP/METADATA API to get the all the registered users of an enterprise using an API call with the admin's auth-token? I only require the email address, name and role of the all the enterprise users

share|improve this question
up vote 7 down vote accepted

you could either use the REST API

curl https://<INSTANCE>,+name+,+roleid+from+User -H "Authorization: Bearer token"

for details see

or you can run a SOQL query against the SOAP API using your access token for the session ID

Details in the WebServices API Documentation

share|improve this answer
What do you mean when you say 'depending on the number of users'? Is there a limit in case of the REST API? – auny May 16 '13 at 10:14
not necessarily at a limit, except for the general 50k record Governor Limit. But I personally tend to use the SOAP API when working with larger record sets and programmatic requests – Seb Wagner May 16 '13 at 14:54
there is no 50k governor limit for the rest api, thats for apex. – superfell May 16 '13 at 16:34
@superfell: you are absolutely right, error in reasoning. modified the answer – Seb Wagner May 16 '13 at 21:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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