# Azure

Brainboard allows you to connect to your Azure environments, whether you want to provision resources, import existing infrastructure or simply manage your architecture on a daily basis.

It supports 2 authentication methods described below:

1. [Client certificate](#client-certificate) (recommended)
2. [Client secret](#client-secret)

{% hint style="info" %}
You need an app registration in your Azure account to be able to connect Brainboard successfully.
{% endhint %}

### Configure access

To connect Brainboard to your AWS account:

1. Go to the [Cloud providers integration](https://app.brainboard.co/settings/integrations/cloud-providers) settings page.
2. Click on `Microsoft Azure`
3. Click on `New connection`&#x20;

   <figure><img src="https://2733077811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7YhVIZuz5Brv8kisTlFL%2Fuploads%2FE5ZISyf81wRqkZpGkAGw%2FCleanShot%202025-04-24%20at%2016.22.18%402x.png?alt=media&#x26;token=911874a5-9aac-45ae-89f1-813256a93aa9" alt=""><figcaption></figcaption></figure>
4. This will open the new connection page where you have 2 options:

   <figure><img src="https://2733077811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7YhVIZuz5Brv8kisTlFL%2Fuploads%2F9Y3GL8WEdO4P5I7Q5fAb%2FCleanShot%202025-04-24%20at%2016.22.28%402x.png?alt=media&#x26;token=99faadca-ce2d-45bb-93f4-7a31cbdf11f2" alt=""><figcaption></figcaption></figure>

### Client certificate

{% hint style="success" %}
This is the recommended way to connect to your Azure environments as it doesn't require any secret sharing.
{% endhint %}

When you click on the option `Client Certificate` Brainboard guides you in the connection process:

1. In this page, click on `Register app` button, it will open your Azure portal with pre-filled information and download the certificate

   <figure><img src="https://2733077811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7YhVIZuz5Brv8kisTlFL%2Fuploads%2F4tJObB02cChaNmNbkvvD%2FCleanShot%202025-04-24%20at%2016.40.23%402x.png?alt=media&#x26;token=fbd4d1ff-7de4-43c1-852c-502cda51af3d" alt=""><figcaption></figcaption></figure>
2. In your Azure portal, add a name of the app registration and click `Register`

   <figure><img src="https://2733077811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7YhVIZuz5Brv8kisTlFL%2Fuploads%2FAegjTlSkvKyi8Pg7FIB7%2FCleanShot%202025-04-24%20at%2016.32.27%402x.png?alt=media&#x26;token=77315472-cf49-4d23-a139-4d26c2fcd381" alt=""><figcaption></figcaption></figure>
3. Once the app registration done, navigate to the [app registration page](https://portal.azure.com/#view/Microsoft_AAD_RegisteredApps/ApplicationsListBlade) and search for the one you just created, then click on it to open its configuration

   <figure><img src="https://2733077811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7YhVIZuz5Brv8kisTlFL%2Fuploads%2FGiLSCni1ne5smuws85hd%2FCleanShot%202025-04-24%20at%2016.34.59%402x.png?alt=media&#x26;token=65396346-d547-4122-8149-58cd6b97d328" alt=""><figcaption></figcaption></figure>
4. Go to manage, then Certificates & secrets, and click on certificates tab and upload the certificate you downloaded in step 1

   <figure><img src="https://2733077811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7YhVIZuz5Brv8kisTlFL%2Fuploads%2Fho0gXVu0nDw54Og7BsPv%2FCleanShot%202025-04-24%20at%2016.38.47%402x.png?alt=media&#x26;token=3c96f8cd-74fc-4529-b491-679ca7a18a41" alt=""><figcaption></figcaption></figure>
5. In the same app registration page, click on overview to get the follow information:
   1. Application (client) id
   2. Directory (tenant) id
6. Go to the subscription that you want to connect to Brainboard and get its ID
7. Navigate to Access control (IAM) to create a role assignment with the right privilege

   <figure><img src="https://2733077811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7YhVIZuz5Brv8kisTlFL%2Fuploads%2FNazFyDsE0hZvaqVngn5c%2FCleanShot%202025-04-24%20at%2016.47.58%402x.png?alt=media&#x26;token=50013834-55c7-4494-98bd-c00b2e77678d" alt=""><figcaption></figcaption></figure>
8. In Brainboard, put all the information you collected before, and click `Continue`:
   1. Application (client) id
   2. Directory (tenant) id
   3. Subscription id
9. Brainboard checks if the connection can be established:
   1. If the connection is successful, you will have this message

      <figure><img src="https://2733077811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7YhVIZuz5Brv8kisTlFL%2Fuploads%2FCjTrET1kB3WXNJyBeKbD%2FCleanShot%202025-04-24%20at%2016.51.09%402x.png?alt=media&#x26;token=93d8f33c-92c3-4190-980a-ca4d7dcfc1e6" alt=""><figcaption></figcaption></figure>
   2. If it fails, you get an information about it

      <figure><img src="https://2733077811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7YhVIZuz5Brv8kisTlFL%2Fuploads%2FiWpj3TDCX5diE29D1WL6%2FCleanShot%202025-04-24%20at%2016.52.48%402x.png?alt=media&#x26;token=ebf8a542-5da7-44ec-807d-3b4a54359206" alt=""><figcaption></figcaption></figure>
10. Name the connection in Brainboard

    <figure><img src="https://2733077811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7YhVIZuz5Brv8kisTlFL%2Fuploads%2Fp8F92hI5jsVYeL1FxVQt%2FCleanShot%202025-04-24%20at%2016.52.13%402x.png?alt=media&#x26;token=87e17530-50ed-4f08-af7f-c60209cd119a" alt=""><figcaption></figcaption></figure>

    This name is used only within Brainboard, so it's a best practice to give an explicit name that allows you to identify which subscription is referring to.

### Client secret

Brainboard allows you to add your client secret if this is your preferred way to connect to your Azure environments:

<figure><img src="https://2733077811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7YhVIZuz5Brv8kisTlFL%2Fuploads%2FaXpq3VyND8nqMRo6QVhO%2FCleanShot%202025-04-24%20at%2016.56.54%402x.png?alt=media&#x26;token=6ebf610d-cb50-4da8-bd61-bbef32aef6c9" alt=""><figcaption></figcaption></figure>

Follow the same steps as [#client-certificate](#client-certificate "mention") except in step 4, generate a new client secret

<figure><img src="https://2733077811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7YhVIZuz5Brv8kisTlFL%2Fuploads%2F9gSt75lHXp5Ht0FBbzLS%2FCleanShot%202025-04-24%20at%2016.59.07%402x.png?alt=media&#x26;token=a59968a9-fbac-416e-b448-cd33a9e58300" alt=""><figcaption></figcaption></figure>

### Set the scope

Once your credentials are added you can specify where exactly they will be used

<figure><img src="https://2733077811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7YhVIZuz5Brv8kisTlFL%2Fuploads%2FJOkkruASglxb20B7t5EI%2FCleanShot%202025-04-24%20at%2017.02.49%402x.png?alt=media&#x26;token=ba32f6d3-e736-47b7-b674-7460f31a9d70" alt=""><figcaption></figcaption></figure>

This allows you to specify whether you want:

1. Make the credentials the default to use within your organization: which means any architecture created in Brainboard will use these credentials if it doesn't have its own ones.
2. Use in a specific project
3. Use in a specific environment
4. Use in a specific architecture

<figure><img src="https://2733077811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7YhVIZuz5Brv8kisTlFL%2Fuploads%2FVN6sVnozeuj50fIqjsBL%2FCleanShot%202025-04-24%20at%2017.03.39%402x.png?alt=media&#x26;token=2c86d9be-2b77-4864-8cad-0942eccadfe3" alt=""><figcaption></figcaption></figure>
