# Get a user


[API catalog](/reference/api/) · [Docker Hub overview](/reference/api/hub/latest/) · [Product manual](https://docs.docker.com/docker-hub/) · [OpenAPI specification](/reference/api/hub/latest.yaml)

API version: 2-beta



`GET /v2/scim/2.0/Users/{id}`

Returns a user by ID.


## Connection and access

[API connection and authentication guidance](/reference/api/hub/latest/#authentication)


Server: `https://hub.docker.com`

Effective security: alternatives are OR; schemes within an alternative are AND. An empty array declares no HTTP authentication requirement.

```json
[
  {
    "scimToken": []
  }
]
```
## Example request

Replace placeholders and provide the required credentials or request body.

```console
curl \
  --request GET \
  --header "Authorization: Bearer ${SCIM_TOKEN}" \
  --header 'Accept: application/scim+json' \
  'https://hub.docker.com/v2/scim/2.0/Users/d80f7c79-7730-49d8-9a41-7c42fb622d9c'
```

## Parameters

### id

Location: path. Required: yes.

The user ID.

```json
{
  "description": "The user ID.",
  "example": "d80f7c79-7730-49d8-9a41-7c42fb622d9c",
  "in": "path",
  "name": "id",
  "pointer": "/paths/~1v2~1scim~12.0~1Users~1{id}/parameters/0",
  "required": true,
  "schema": {
    "type": "string"
  }
}
```

## Request and responses

### Response 200 application/scim+json




Schema:

```json
{
  "$ref": "#/components/schemas/scim_user"
}
```




Schema example:
```json
{
  "active": true,
  "displayName": "jonsnow",
  "emails": [
    {
      "display": "jon.snow@docker.com",
      "primary": true,
      "value": "jon.snow@docker.com"
    }
  ],
  "groups": [
    {
      "display": "nightswatch",
      "value": "nightswatch"
    }
  ],
  "id": "d80f7c79-7730-49d8-9a41-7c42fb622d9c",
  "meta": {
    "created": "2022-05-20T00:54:18Z",
    "lastModified": "2022-05-20T00:54:18Z",
    "location": "https://hub.docker.com/v2/scim/2.0/Users/d80f7c79-7730-49d8-9a41-7c42fb622d9c",
    "resourceType": "User"
  },
  "name": {
    "familyName": "Snow",
    "givenName": "Jon"
  },
  "schemas": [
    "urn:ietf:params:scim:schemas:core:2.0:User"
  ],
  "userName": "jon.snow@docker.com"
}
```


### Response 400 application/scim+json

Bad Request


Schema:

```json
{
  "allOf": [
    {
      "$ref": "#/components/schemas/scim_error"
    },
    {
      "properties": {
        "scimType": {
          "description": "Some types of errors will return this per the specification.",
          "type": "string"
        },
        "status": {
          "example": "400"
        }
      }
    }
  ]
}
```




error:
```json
{
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:Error"
  ],
  "status": "400"
}
```


### Response 401 application/scim+json

Unauthorized


Schema:

```json
{
  "allOf": [
    {
      "$ref": "#/components/schemas/scim_error"
    },
    {
      "properties": {
        "status": {
          "example": "401"
        }
      }
    }
  ]
}
```




error:
```json
{
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:Error"
  ],
  "status": "401"
}
```


### Response 403 application/scim+json

Forbidden


Schema:

```json
{
  "allOf": [
    {
      "$ref": "#/components/schemas/scim_error"
    },
    {
      "properties": {
        "status": {
          "example": "403"
        }
      }
    }
  ]
}
```




error:
```json
{
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:Error"
  ],
  "status": "403"
}
```


### Response 404 application/scim+json

Not Found


Schema:

```json
{
  "allOf": [
    {
      "$ref": "#/components/schemas/scim_error"
    },
    {
      "properties": {
        "status": {
          "example": "404"
        }
      }
    }
  ]
}
```




error:
```json
{
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:Error"
  ],
  "status": "404"
}
```


### Response 500 application/scim+json

Internal Error


Schema:

```json
{
  "allOf": [
    {
      "$ref": "#/components/schemas/scim_error"
    },
    {
      "properties": {
        "status": {
          "example": "500"
        }
      }
    }
  ]
}
```




error:
```json
{
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:Error"
  ],
  "status": "500"
}
```


## Complete operation contract

```json
{
  "description": "Returns a user by ID.\n",
  "operationId": "getV2Scim20UsersById",
  "responses": {
    "200": {
      "$ref": "#/components/responses/scim_get_user_resp"
    },
    "400": {
      "$ref": "#/components/responses/scim_bad_request"
    },
    "401": {
      "$ref": "#/components/responses/scim_unauthorized"
    },
    "403": {
      "$ref": "#/components/responses/scim_forbidden"
    },
    "404": {
      "$ref": "#/components/responses/scim_not_found"
    },
    "500": {
      "$ref": "#/components/responses/scim_error"
    }
  },
  "security": [
    {
      "scimToken": []
    }
  ],
  "summary": "Get a user",
  "tags": [
    "scim"
  ]
}
```

## Referenced schemas

- `#/components/responses/scim_bad_request`

- `#/components/responses/scim_error`

- `#/components/responses/scim_forbidden`

- `#/components/responses/scim_get_user_resp`

- `#/components/responses/scim_not_found`

- `#/components/responses/scim_unauthorized`




