# Azure DevOps

For using repositories from Azure Devops with Terrakube workspaces and modules you will need to follow these steps:

{% hint style="info" %}
**Manage VCS Providers** permission is required to perform this action, please check [team-management](https://docs.terrakube.io/2.19.0/user-guide/organizations/team-management "mention") for more info.
{% endhint %}

Navigate to the desired organization and click the **Settings** button, then on the left menu select **VCS Providers**&#x20;

<figure><img src="https://content.gitbook.com/content/z07DOLykiAoqb1CSQVQz/blobs/sKsJRls5O2ia8ZjE4s8Q/image.png" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
If you prefer, you can add a new VCS Provider directly from the [Create workspace](https://docs.terrakube.io/2.19.0/user-guide/workspaces/creating-workspaces) or Create Module screen.
{% endhint %}

Click the **Azure Devops** button

<figure><img src="https://content.gitbook.com/content/z07DOLykiAoqb1CSQVQz/blobs/nrIujVwS5y1t10sUvb8o/image.png" alt=""><figcaption></figcaption></figure>

In the next screen click the link to [register a new OAuth Application](https://aex.dev.azure.com/app/register?mkt=en-US) in Azure Devops

<figure><img src="https://content.gitbook.com/content/z07DOLykiAoqb1CSQVQz/blobs/uEkKhqRzFNzD88uND5uc/image.png" alt=""><figcaption></figcaption></figure>

In the Azure Devops page, complete the required fields and click **Create application**

<table><thead><tr><th width="354">Field</th><th>Description</th></tr></thead><tbody><tr><td>Company Name </td><td>Your company name.</td></tr><tr><td>Application name</td><td>The name of your application or you can use the Organization name</td></tr><tr><td>Application website</td><td>Your application or website url </td></tr><tr><td>Callback URL</td><td>Copy the Callback URL from the Terrakube URL</td></tr><tr><td>Authorized scopes (checkboxes)</td><td>Only the following should be checked: Code (read) Code (status)</td></tr></tbody></table>

{% hint style="info" %}
You can complete the fields using the information suggested by terrakube in the VCS provider screen
{% endhint %}

<figure><img src="https://content.gitbook.com/content/z07DOLykiAoqb1CSQVQz/blobs/YUFOhZdF4Gd7MOi7M6iz/image.png" alt=""><figcaption></figcaption></figure>

In the next screen, copy the **App ID** and **Client Secret**

<figure><img src="https://content.gitbook.com/content/z07DOLykiAoqb1CSQVQz/blobs/RfS8w9XzoOug6vPUr7FR/image.png" alt=""><figcaption></figcaption></figure>

Go back to Terrakube to enter the information you copied from the previous step. Then, click the **Connect and Continue** button.

<figure><img src="https://content.gitbook.com/content/z07DOLykiAoqb1CSQVQz/blobs/lOS18O5xMNB6cT1va1Fb/image.png" alt=""><figcaption></figcaption></figure>

You will see an Azure Devops window, click the **Accept** button to complete the connection

<figure><img src="https://content.gitbook.com/content/z07DOLykiAoqb1CSQVQz/blobs/6fUeVecyRQshcUBOL1pc/image.png" alt=""><figcaption></figcaption></figure>

Finally, if the connection was established successfully, you will be redirected to the VCS provider’s page in your organization. You should see the connection status with the date and the user that created the connection.

<figure><img src="https://content.gitbook.com/content/z07DOLykiAoqb1CSQVQz/blobs/kHxScKTVi63WPLMZE3X1/image.png" alt=""><figcaption></figcaption></figure>

And now, you will be able to use the connection in your workspaces and modules:

<figure><img src="https://content.gitbook.com/content/z07DOLykiAoqb1CSQVQz/blobs/BQOgWroVnCk6G9sbuOgP/image.png" alt=""><figcaption></figcaption></figure>
