> For the complete documentation index, see [llms.txt](https://docs.hivel.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hivel.ai/integrations/project-management/azure-boards.md).

# Azure Boards

Integrate Azure Boards with a Personal Access Token (Hivel agent)

To connect Azure Boards to Hivel using a Personal Access Token (PAT), follow these steps:

**Data Access by Hivel**

* Hivel accesses the past 30-90 days of commits and pull requests from active repositories during the initial sync.

**Authorization Mechanism**

* Hivel gets access using a Personal Access Token, which can be created using this [open the API tokens page](https://learn.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops\&tabs=Windows#create-a-pat).
* Users maintain full control and can withdraw access anytime by revoking the Personal Access Token.

**Requirements**

* Ensure to create the Personal Access Token from an account that has "Project Administrator" permissions for all relevant projects and repositories.

**Best Practice**

* Opt for a service account rather than an individual-linked account.
* Service accounts are typically overseen by the company's admin.

### **Steps to integrate Azure Boards with PAT**

#### **Step 1: Prepare a Service Account**

1. **Log into the Azure Boards service account:**
   * Use a dedicated service account that has "Project Administrator" permissions for the projects and repositories Hivel should analyze.
   * Avoid using personal accounts to ensure only the intended projects are accessed.

#### **Step 2: Create the Personal Access Token**

1. Click on the user settings on the top right corner to the left of the profile icon.

<img src="https://3057781534-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5KAIOUWph0JLSgQqbzyT%2Fuploads%2FAKMlcypnWWEOPNfNLS9z%2Funknown.png?alt=media&amp;token=4e245dc9-c4b7-4711-b58e-27daa82d9528" alt="" height="401" width="679">

1. Create a new Personal Access Token in Azure Boards.

   <img src="https://3057781534-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5KAIOUWph0JLSgQqbzyT%2Fuploads%2FBdhl7xgDLdXFSsPZjjOO%2Funknown.png?alt=media&amp;token=748ff1a7-64ce-43b9-a2a1-01770e8d5c63" alt="" height="360" width="301">
2. Enter *Hivel* as the token name.
3. Ensure **'All accessible organizations'** is selected while creating the Personal Access Token.
4. Set the expiration to the **longest period your organization's policy allows**. (You can revoke the token manually when the engagement ends.)

<img src="https://3057781534-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5KAIOUWph0JLSgQqbzyT%2Fuploads%2FRSxOAapEUfERnolu1oin%2Funknown.png?alt=media&amp;token=d3f8714d-5ac0-46b0-bc27-85adcd2420cc" alt="" height="297" width="546">

&#x20;            Set the scope to Custom Defined.

5. Please ensure you select all the permissions below -**all Read**:
   * **Project And Team:** Read
   * **User Profile:** Read
   * **Code:** Read
   * **Work Items:** Read
6. Create the token and **copy it immediately**, as you won't be able to view it again.

#### Step 3: Connect in Hivel

1. **Copy the generated token** immediately, as you won't be able to view it again.
2. Submit the token to Hivel.

Hivel validates the token instantly -if the token is wrong, expired, or revoked, Hivel shows a clear message telling you exactly what the problem is. Generate a new token with the correct permissions and reconnect.

That's it, all done!
