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

# Azure DevOps

> Comprehensive Guide to Configuring Azure DevOps with Corgea

The integration of Azure DevOps with Corgea empowers users to seamlessly scan projects and initiate pull requests for code fixes directly from the Corgea platform.

<Steps>
  <Step title="Generate an Azure DevOps Personal Access Token">
    Access your Azure DevOps account and generate a personal access token (PAT) with both read and write permissions.

    <Frame>
      <img src="https://mintcdn.com/corgea/uxLuQR4653lM43Tj/images/azure-devops-1.png?fit=max&auto=format&n=uxLuQR4653lM43Tj&q=85&s=88f9542152a162b66fed06a4ec6a9e64" style={{ borderRadius: '0.5rem' }} alt="Create Personal Access Token" width="294" height="402" data-path="images/azure-devops-1.png" />
    </Frame>

    <Frame>
      <img src="https://mintcdn.com/corgea/uxLuQR4653lM43Tj/images/azure-devops-2.png?fit=max&auto=format&n=uxLuQR4653lM43Tj&q=85&s=10c4a67d2cce8b477c5dd59592d6a0bf" style={{ borderRadius: '0.5rem' }} alt="Token Permissions" width="651" height="952" data-path="images/azure-devops-2.png" />
    </Frame>
  </Step>

  <Step title="Integrate the Token with Corgea">
    Proceed to the <a href="https://www.corgea.app/integrations/" target="_blank">Integrations</a> page on Corgea. Click the "+" button within the Azure DevOps section and ensure the token is securely saved.

    <Frame>
      <img src="https://mintcdn.com/corgea/uxLuQR4653lM43Tj/images/azure-devops-modal-3.png?fit=max&auto=format&n=uxLuQR4653lM43Tj&q=85&s=6f4a74071fbde89934b6b6ac24fbd5e0" style={{ borderRadius: '0.5rem' }} alt="Add Token to Corgea" width="2140" height="1252" data-path="images/azure-devops-modal-3.png" />
    </Frame>
  </Step>

  <Step title="Identify Azure DevOps Projects in Corgea">
    After configuration, navigate to the <a href="https://www.corgea.app/projects/" target="_blank">Projects</a> page. Your Azure DevOps project will be displayed with a Windows icon. Click the "+" in the action column to initiate the first scan, or select the project name and click "New Scan" to commence a new scan.

    <Frame>
      <img src="https://mintcdn.com/corgea/uxLuQR4653lM43Tj/images/azure-devops-projects-4.png?fit=max&auto=format&n=uxLuQR4653lM43Tj&q=85&s=c42a658e1734ac671564acb892acd823" style={{ borderRadius: '0.5rem' }} alt="Search Projects" width="2726" height="910" data-path="images/azure-devops-projects-4.png" />
    </Frame>
  </Step>

  <Step title="Submit a Pull Request to Azure DevOps">
    From any issue page associated with Azure DevOps projects in Corgea, you can submit a pull request to address an issue.

    <Frame>
      <img src="https://mintcdn.com/corgea/uxLuQR4653lM43Tj/images/azure-devops-issue-pr-5.png?fit=max&auto=format&n=uxLuQR4653lM43Tj&q=85&s=170ad0fb0f0473d9c1b8a8501296b621" style={{ borderRadius: '0.5rem' }} alt="Issue Pull Request" width="4414" height="2238" data-path="images/azure-devops-issue-pr-5.png" />
    </Frame>
  </Step>
</Steps>

## Optional: Webhook Configuration

To enable scans for each pull request, configure a webhook. Ensure you possess the requisite permissions to set up webhooks for your project.

<Steps>
  <Step>
    Select "Project settings" located at the bottom left of the Azure DevOps interface.

    <Frame>
      <img src="https://mintcdn.com/corgea/uxLuQR4653lM43Tj/images/azure-webhook-1.png?fit=max&auto=format&n=uxLuQR4653lM43Tj&q=85&s=7691ffcbb26b37bd8b6396a5c01509e3" style={{ borderRadius: '0.5rem' }} alt="Project Settings" width="1320" height="1616" data-path="images/azure-webhook-1.png" />
    </Frame>
  </Step>

  <Step>
    Click on "Service Hooks". Multiple clicks may be necessary if it does not load immediately.

    <Frame>
      <img src="https://mintcdn.com/corgea/uxLuQR4653lM43Tj/images/azure-webhook-2.png?fit=max&auto=format&n=uxLuQR4653lM43Tj&q=85&s=c7e432329a7eea7459474d5155a74bcb" style={{ borderRadius: '0.5rem', width: '50%' }} alt="Service Hooks" width="628" height="928" data-path="images/azure-webhook-2.png" />
    </Frame>
  </Step>

  <Step>
    Click the "+" button and choose "Web Hooks".

    <Frame>
      <img src="https://mintcdn.com/corgea/uxLuQR4653lM43Tj/images/azure-webhook-3.png?fit=max&auto=format&n=uxLuQR4653lM43Tj&q=85&s=677f4fbb1473dbff151d0b5949678d0f" style={{ borderRadius: '0.5rem' }} alt="Web Hooks" width="2368" height="1590" data-path="images/azure-webhook-3.png" />
    </Frame>
  </Step>

  <Step>
    Select "Pull request created" as the trigger event, configure any optional settings, and click "Next".

    <Frame>
      <img src="https://mintcdn.com/corgea/uxLuQR4653lM43Tj/images/azure-webhook-4.png?fit=max&auto=format&n=uxLuQR4653lM43Tj&q=85&s=87c1d1fd737c2d60538563108152d836" style={{ borderRadius: '0.5rem' }} alt="Trigger Event" width="1596" height="1324" data-path="images/azure-webhook-4.png" />
    </Frame>
  </Step>

  <Step>
    In the Settings section, input the URL as [https://www.corgea.app/azure\_webhook/](https://www.corgea.app/azure_webhook/) or `https://your_instance.corgea.app/azure_webhook/` for private deployments.

    <Frame>
      <img src="https://mintcdn.com/corgea/uxLuQR4653lM43Tj/images/azure-webhook-fill-in-url.png?fit=max&auto=format&n=uxLuQR4653lM43Tj&q=85&s=680bd4ede219087aaf6051e030cb446d" style={{ borderRadius: '0.5rem' }} alt="Webhook URL" width="1600" height="1014" data-path="images/azure-webhook-fill-in-url.png" />
    </Frame>
  </Step>

  <Step>
    Open a new browser tab, navigate to the Corgea integrations page, and locate your Azure integration. Copy the X-CORGEA-UUID value.

    <Frame>
      <img src="https://mintcdn.com/corgea/uxLuQR4653lM43Tj/images/azure-webhook-5.png?fit=max&auto=format&n=uxLuQR4653lM43Tj&q=85&s=a2a610c03862facbf2d78de5b396afab" style={{ borderRadius: '0.5rem' }} alt="X-CORGEA-UUID" width="2580" height="1268" data-path="images/azure-webhook-5.png" />
    </Frame>
  </Step>

  <Step>
    Return to the Azure DevOps Webhook configuration page and populate the headers section with:

    * X-CORGEA-UUID: (UUID value you copied)
    * X-WEB-TOKEN: (the same PAT configured in Corgea)

    <Frame>
      <img src="https://mintcdn.com/corgea/uxLuQR4653lM43Tj/images/azure-webhook-6.png?fit=max&auto=format&n=uxLuQR4653lM43Tj&q=85&s=154c967cbd2113229cba93090a29cf9d" style={{ borderRadius: '0.5rem' }} alt="Headers Configuration" width="1664" height="1548" data-path="images/azure-webhook-6.png" />
    </Frame>
  </Step>

  <Step>
    Click "Finish" to save the configuration. Disregard the "Test" button as it may attempt to trigger scans for files you do not have access to.
  </Step>

  <Step>
    Validate the setup by creating a new pull request. A successful configuration will display a successful event in the webhook history and trigger a new scan on the Corgea Scans page at [https://www.corgea.app/scans/](https://www.corgea.app/scans/).

    <Frame>
      <img src="https://mintcdn.com/corgea/uxLuQR4653lM43Tj/images/azure-webhook-7.png?fit=max&auto=format&n=uxLuQR4653lM43Tj&q=85&s=af6a9e70cbf68dc4a8b77a27e18718f9" style={{ borderRadius: '0.5rem' }} alt="Webhook History" width="2770" height="1792" data-path="images/azure-webhook-7.png" />
    </Frame>

    <Frame>
      <img src="https://mintcdn.com/corgea/uxLuQR4653lM43Tj/images/azure-webhook-8.png?fit=max&auto=format&n=uxLuQR4653lM43Tj&q=85&s=4322d341d32fae066a49b6b221a5b22d" style={{ borderRadius: '0.5rem' }} alt="Corgea Scans" width="3842" height="634" data-path="images/azure-webhook-8.png" />
    </Frame>
  </Step>
</Steps>
