See api-docs Menu

v1-v3 APIs have been deprecated

Don't worry, these APIs are deprecated, but they aren't shut off yet.

All new development with APIs should use the newest version of our API: /1. API /1 is based on RESTful principles, is secured by OAuth 2.0, and provides JSON messages, search, pagination, sorting, and filtering.

Get User by Username

For a description of each element in the User resource, see User Resource.

Resource URL





Set to the user’s username. If you don’t know the user’s username, use the Get Users API call to return all users and their username values.



Set to true if you want the response to include any custom attributes that have been defined for the user.

Sample Response

    <directory-id nil="true"></directory-id>
    <distinguished-name nil="true"></distinguished-name>
    <external-id nil="true"></external-id>
    <invitation-sent-at nil="true"></invitation-sent-at>
    <locale-code nil="true"></locale-code>
    <locked-until nil="true"></locked-until>
    <member-of nil="true"></member-of>
           <name>SF Office</name>
           <name>Tech Writer</name>
   <message>API key is invalid or missing</message>
   <title>Record Not Found</title>
   <message>No user found by username 'jeniffer'</message>

Sample cURL Request

Be sure to replace placeholder values surrounded by { } with actual values.

curl -u {api_key}:x \
-X GET{username}? \

Postman Collection

Be sure to set Postman-specific environment variables indicated by {{ }}.

Download for the Users API

Have a Question?

Found a problem or a bug? Submit a support ticket.

Looking for walkthroughs or how-to guides on OneLogin's user and admin features? Check out the documentation in our Knowledge Base.

Have a product idea or request? Share it with us in our Ideas Portal.