> ## Documentation Index
> Fetch the complete documentation index at: https://docs.refacto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Azure Repos

> Connect Refacto to your Azure DevOps Repos.

Follow these steps to connect Refacto to your Azure DevOps repositories.

<Steps>
  <Step title="Go to Integrations" icon="window">
    * Navigate to the **Integrations** page in your Refacto dashboard.
    * Click **Connect** on **Azure Repos**.

          <img src="https://mintcdn.com/devdynamics/BbQUNI-HGihsOD27/images/installation/azure/azure-integration-page.png?fit=max&auto=format&n=BbQUNI-HGihsOD27&q=85&s=0b74759ca0ac5b86055fbd4151d101ef" alt="Azure Integration Page Pn" width="2538" height="948" data-path="images/installation/azure/azure-integration-page.png" />
  </Step>

  <Step title="Open Azure Repos Setup Form" icon="clipboard-list">
    * After clicking **Connect**, you’ll be redirected to the **Azure Repos setup form** in Refacto.
    * This form requires three fields: **PAT Token**, **Organisation Name**, and **Bot Email**.
    * To get these values, please follow the next steps:
      * Create a Review User
      * Generate a Personal Access Token (PAT)

            <img src="https://mintcdn.com/devdynamics/QgbnpHBY57pvNJLU/images/installation/azure/azure-form.png?fit=max&auto=format&n=QgbnpHBY57pvNJLU&q=85&s=d88f343d1cfa74a99b523dc546ad55a9" alt="Azure Setup Form Empty Pn" width="3016" height="1050" data-path="images/installation/azure/azure-form.png" />
  </Step>

  <Step title="Create a Review User" icon="user">
    You need to create a dedicated **review user** in Azure DevOps.

    1. Navigate to **Organization Settings**.

           <img src="https://mintcdn.com/devdynamics/eA64gkzV-qTqlN7y/images/installation/azure/org-setting.png?fit=max&auto=format&n=eA64gkzV-qTqlN7y&q=85&s=c23a57de226051b05c88e433d242bf8f" alt="Org Setting Pn" width="1600" height="1000" data-path="images/installation/azure/org-setting.png" />
    2. Go to **Users** from the sidebar. Click **Add users**.

           <img src="https://mintcdn.com/devdynamics/eA64gkzV-qTqlN7y/images/installation/azure/click-on-add-users.png?fit=max&auto=format&n=eA64gkzV-qTqlN7y&q=85&s=47d7176efac37e24312944fbc7744c3f" alt="Click On Add Users Pn" width="1600" height="1000" data-path="images/installation/azure/click-on-add-users.png" />
    3. Enter **email** or **review user**. Choose Access level as **Basic**. Choose the projects.

           <img src="https://mintcdn.com/devdynamics/eA64gkzV-qTqlN7y/images/installation/azure/choose-project.png?fit=max&auto=format&n=eA64gkzV-qTqlN7y&q=85&s=24ec02b415418b951d027c335e47f460" alt="Choose Project Pn" width="768" height="1234" data-path="images/installation/azure/choose-project.png" />
    4. Choose **Project Adminstrator** as Azure Devops Group. It is required to create webhooks in **Service Hooks**.

           <img src="https://mintcdn.com/devdynamics/eA64gkzV-qTqlN7y/images/installation/azure/project-admin.png?fit=max&auto=format&n=eA64gkzV-qTqlN7y&q=85&s=38ccbf15f80aac02ccae6395658314d5" alt="Project Admin Pn" width="762" height="1486" data-path="images/installation/azure/project-admin.png" />
  </Step>

  <Step title="Generate a Personal Access Token (PAT)" icon="key">
    Azure DevOps provides an option to generate a **Personal Access token** for a user. Follow these steps to generate the token:

    1. Next to your avatar on the header’s right side is a settings icon, click it, then choose **Personal Access Tokens**.

           <img src="https://mintcdn.com/devdynamics/g7B9vA2ci0pkpwoI/images/installation/azure/pat1.png?fit=max&auto=format&n=g7B9vA2ci0pkpwoI&q=85&s=08bc1e88963dfb6b4134ae05a43a3033" alt="Pat1 Pn" width="1600" height="1000" data-path="images/installation/azure/pat1.png" />
    2. Click **New Token**.

           <img src="https://mintcdn.com/devdynamics/g7B9vA2ci0pkpwoI/images/installation/azure/pat2.png?fit=max&auto=format&n=g7B9vA2ci0pkpwoI&q=85&s=4f4cb3e802e08b4b0a56dbb34ff21f44" alt="Pat2 Pn" width="1600" height="1000" data-path="images/installation/azure/pat2.png" />
    3. Enter a name and an expiry date for the token.

           <img src="https://mintcdn.com/devdynamics/g7B9vA2ci0pkpwoI/images/installation/azure/pat3.png?fit=max&auto=format&n=g7B9vA2ci0pkpwoI&q=85&s=96c6b365f6d4004480bf534cc1a7ef17" alt="Pat3 Pn" width="1006" height="924" data-path="images/installation/azure/pat3.png" />
    4. Grant the following permissions:
       1. **Read & Write** Code.
       2. **Read** for Work items.
       3. **Read** Graph for user info like email, name, etc.

              <img src="https://mintcdn.com/devdynamics/g7B9vA2ci0pkpwoI/images/installation/azure/pat4.png?fit=max&auto=format&n=g7B9vA2ci0pkpwoI&q=85&s=03bfeca69d812890afb3f866833adcac" alt="Pat4 Pn" width="1000" height="1098" data-path="images/installation/azure/pat4.png" />

              <img src="https://mintcdn.com/devdynamics/g7B9vA2ci0pkpwoI/images/installation/azure/pat5.png?fit=max&auto=format&n=g7B9vA2ci0pkpwoI&q=85&s=fb1834ff0052460383f9310bd2d8feb0" alt="Pat5 Pn" width="992" height="1084" data-path="images/installation/azure/pat5.png" />

              <img src="https://mintcdn.com/devdynamics/g7B9vA2ci0pkpwoI/images/installation/azure/pat6.png?fit=max&auto=format&n=g7B9vA2ci0pkpwoI&q=85&s=09432978294f780c599f6326f34a1693" alt="Pat6 Pn" width="964" height="1088" data-path="images/installation/azure/pat6.png" />

    <Note>
      Copy and save token. As its shown only once.
    </Note>
  </Step>

  <Step title="Fill in the Setup Form" icon="check">
    On the Azure Repos setup page in Refacto, provide the following:

    * **PAT Token** – Paste the token you generated above.
    * **Azure DevOps Organisation Name** – Extract this from your Azure DevOps URL.\
      Example:

      > `https://dev.azure.com/bluetowers/`
    * → organisation name is **bluetowers**.
    * **Bot Email** – Enter the email of the review user you created earlier.

    Click **Save Settings** when done.
  </Step>

  <Step title="Done" icon="party-horn">
    Your Azure Repos integration is now active.
  </Step>
</Steps>
