Skip to content

Commit

Permalink
Add section about using personal access tokens to README
Browse files Browse the repository at this point in the history
The uipathcli supports personal access tokens (PAT) since some time now.
Extended the auth documentation to include details on how to use PATs.
  • Loading branch information
thschmitt committed Dec 24, 2023
1 parent 854e9bc commit 9c10dee
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ The CLI supports multiple ways to authorize with the UiPath services:

- **OAuth Login**: Login to UiPath using your browser and SSO of choice. This is the preferred flow when you are using the CLI interactively. No need to manage any credentials.

- **Personal Access Token**: Generate a PAT and configure the CLI to use the access token.

### Client Credentials

In order to use client credentials, you need to set up an [External Application (Confidential)](https://docs.uipath.com/automation-cloud/docs/managing-external-applications) and generate an [application secret](https://docs.uipath.com/automation-suite/docs/managing-external-applications#generating-a-new-app-secret):
Expand Down Expand Up @@ -220,6 +222,40 @@ Successfully configured uipath CLI
uipath orchestrator users get
```

### Personal Access Token

You need to generate a personal access token (PAT) and configure the CLI to use it:

1. Go to [https://cloud.uipath.com/\<*your-org*\>/portal_/personalAccessToken](https://cloud.uipath.com)

2. Click **+ Generate new token**

3. Fill out the fields:
* **Name**: *\<token-name\>*
* **Expiration Date**: Set an expiry date for the token
* **+ Add Scopes**: Add the permissions you want to grant the PAT

5. Click **Save** and make sure you copy the generated token.

4. Run the interactive CLI configuration:

```bash
uipath config --auth pat
```

The CLI will ask you to enter the main config settings like
- `organization` and `tenant` used by UiPath services which are account-scoped or tenant-scoped
- `pat` your personal access token

```
Enter organization [not set]: uipatcleitzc
Enter tenant [not set]: DefaultTenant
Enter personal access token [*******26-1]: rt_B637A751...
Successfully configured uipath CLI
```

After that the CLI should be ready and you can validate that it is working by invoking one of the services.

### Configuration File

You can also manually create or edit the configuration file `.uipath/config` in your home directory. The following config file sets up the default profile with clientId, clientSecret so that the CLI can generate a bearer token before calling any of the services. It also sets the organization and tenant for services which require it.
Expand Down

0 comments on commit 9c10dee

Please sign in to comment.