# Get Login Attempts

> Returns the login attempt of the specified user.

Returns the login attempt of the specified user.

## API Endpoint

![docs image](https://dev-assets.cms.uipath.com/assets/images/orchestrator/orchestrator-get_20px.png-b22265cd.webp)

`/identity/api/User/{userId}/loginAttempts`

## Scopes

Requires the following scopes:

* PM.UserLoginAttempt
* PM.UserLoginAttempt.Read

## Request Headers

```
--header 'Authorization: Bearer {access_token}'\
--header 'Content-Type: application/json'
```

:::note
To obtain the `{access_token}`, make sure to authenticate through one of the methods described [here](authentication-methods.md).
:::

## Path Parameters

| Path param | Data type | Description |
| --- | --- | --- |
| `userId`(required) | String | The ID of the user you want to retrieve the login attempts for. |

## Query Parameters

| Query param | Data type | Description |
| --- | --- | --- |
| `userSID`(optional) | string | The user secure ID in Azure Active Directory. |
| `top`(optional) | int32 | Display the top N entries of the login attempts. |
| `skip`(optional) | int32 | Skip the top N login attempts from displaying. |
| `sortBy`(optional) | string | Specify the DTO property used to sort login attempts by.For example, `partitionName`, `clientName`, `clientIpAddress`, etc. |
| `sortOrder`(optional) | string | Specify the sorting order.For example, ascending (`asc`) or descending (`desc`). |
| `since`(optional) | string | Specify the desired starting date of login attempts. |

## Responses

### 200 OK

Returns the queried user login attempts.
