# Return One MongoDB Cloud User by ID **GET /api/atlas/v2/users/{userId}** Returns the details for one MongoDB Cloud user account with the specified unique identifier for the user. You can't use this endpoint to return information on an API Key. To return information about an API Key, use the Return One Organization API Key endpoint. You can always retrieve your own user account. If you are the owner of a MongoDB Cloud organization or project, you can also retrieve the user profile for any user with membership in that organization or project. To use this resource, the requesting Service Account or API Key can have any role. [Return One Organization API Key](https://www.mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Programmatic-API-Keys/operation/getApiKey) ## Servers - https://cloud.mongodb.com: https://cloud.mongodb.com () ## Authentication methods - Service accounts - Digest auth ## Parameters #### Path parameters - **userId** (string) Unique 24-hexadecimal digit string that identifies this user. #### Query parameters - **envelope** (boolean) Flag that indicates whether Application wraps the response in an `envelope` JSON object. Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope=true in the query. Endpoints that return a list of results use the results object as an envelope. Application adds the status parameter to the response body. - **pretty** (boolean) Flag that indicates whether the response body should be in the prettyprint format. ## Responses ### 200: OK #### Body Parameters: application/vnd.atlas.2023-01-01+json (object) - **country** (string) Two alphabet characters that identifies MongoDB Cloud user's geographic location. This parameter uses the ISO 3166-1a2 code format. - **createdAt** (string(date-time)) Date and time when the current account is created. This value is in the ISO 8601 timestamp format in UTC. - **emailAddress** (string(email)) Email address that belongs to the MongoDB Cloud user. - **firstName** (string) First or given name that belongs to the MongoDB Cloud user. - **id** (string) Unique 24-hexadecimal digit string that identifies the MongoDB Cloud user. - **lastAuth** (string(date-time)) Date and time when the current account last authenticated. This value is in the ISO 8601 timestamp format in UTC. - **lastName** (string) Last name, family name, or surname that belongs to the MongoDB Cloud user. - **links** (array[object]) List of one or more Uniform Resource Locators (URLs) that point to API sub-resources, related API resources, or both. RFC 5988 outlines these relationships. - **mobileNumber** (string) Mobile phone number that belongs to the MongoDB Cloud user. - **password** (string(password)) Password applied with the username to log in to MongoDB Cloud. MongoDB Cloud does not return this parameter except in response to creating a new MongoDB Cloud user. Only the MongoDB Cloud user can update their password after it has been set from the MongoDB Cloud console. - **roles** (array[object]) List of objects that display the MongoDB Cloud user's roles and the corresponding organization or project to which that role applies. A role can apply to one organization or one project but not both. - **teamIds** (array[string]) List of unique 24-hexadecimal digit strings that identifies the teams to which this MongoDB Cloud user belongs. - **username** (string(email)) Email address that represents the username of the MongoDB Cloud user. ### 401: Unauthorized. #### Body Parameters: application/json (object) - **badRequestDetail** (object) Bad request detail. - **detail** (string) Describes the specific conditions or reasons that cause each type of error. - **error** (integer(int32)) HTTP status code returned with this error. - **errorCode** (string) Application error code returned with this error. - **parameters** (array[object]) Parameters used to give more information about the error. - **reason** (string) Application error message returned with this error. ### 403: Forbidden. #### Body Parameters: application/json (object) - **badRequestDetail** (object) Bad request detail. - **detail** (string) Describes the specific conditions or reasons that cause each type of error. - **error** (integer(int32)) HTTP status code returned with this error. - **errorCode** (string) Application error code returned with this error. - **parameters** (array[object]) Parameters used to give more information about the error. - **reason** (string) Application error message returned with this error. ### 404: Not Found. #### Body Parameters: application/json (object) - **badRequestDetail** (object) Bad request detail. - **detail** (string) Describes the specific conditions or reasons that cause each type of error. - **error** (integer(int32)) HTTP status code returned with this error. - **errorCode** (string) Application error code returned with this error. - **parameters** (array[object]) Parameters used to give more information about the error. - **reason** (string) Application error message returned with this error. ### 500: Internal Server Error. #### Body Parameters: application/json (object) - **badRequestDetail** (object) Bad request detail. - **detail** (string) Describes the specific conditions or reasons that cause each type of error. - **error** (integer(int32)) HTTP status code returned with this error. - **errorCode** (string) Application error code returned with this error. - **parameters** (array[object]) Parameters used to give more information about the error. - **reason** (string) Application error message returned with this error. [Powered by Bump.sh](https://bump.sh)