Skip to content

Commit

Permalink
Merge pull request #103 from UiPath/feature/readme-pat
Browse files Browse the repository at this point in the history
Add section about using personal access tokens to README
  • Loading branch information
thschmitt authored Jan 10, 2024
2 parents 854e9bc + 9c10dee commit a301f93
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 a301f93

Please sign in to comment.