# Azure Portal

{% hint style="info" %}
The recommended method to create your credentials is using [Powershell](https://docs.hava.io/importing/azure/getting-started-with-azure/powershell). It can be run locally or directly from the Azure Portal, and offers a much simpler approach.
{% endhint %}

### Using the Azure Portal

There are quite a few steps required to allow Hava to access your Azure resources using the Azure Portal.

To allow Hava to import your Azure account you will need to provide access by creating an Active Directory (Microsoft Entra ID) application and assigning read-only permissions to it. To create Entra ID applications you will need admin access to the Azure account.

### Creating a Microsoft Entra ID (Active Directory) Application

1. Using the search bar in the Azure Portal interface, search for `Entra ID`
2. Click and open Microsoft Entra ID from the search results

<figure><img src="https://3601125483-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Loco-kTiJ7Tu_lfPZqb%2Fuploads%2FpiFK2YYltOcyI6KpHIgD%2FAzure_Portal_1.jpg?alt=media&#x26;token=04ba60b6-68bf-44e3-a572-af3bdff0e6e6" alt=""><figcaption></figcaption></figure>

1. Select `App Registration` from the left side menu within Azure Active Directory

<figure><img src="https://3601125483-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Loco-kTiJ7Tu_lfPZqb%2Fuploads%2FQ9NeikUIhgMZAJwadUgQ%2FAzure_Portal_2.jpg?alt=media&#x26;token=e33086fd-7b89-412b-9737-770d368bce53" alt=""><figcaption></figcaption></figure>

1. Click `+ New registration`

<figure><img src="https://3601125483-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Loco-kTiJ7Tu_lfPZqb%2Fuploads%2FJwN8fjdjAQimZ6hKO4jy%2FAzure_Portal_3.jpg?alt=media&#x26;token=04469de8-ce26-43f7-a867-6acaab302349" alt=""><figcaption></figcaption></figure>

### Register an application

Enter the following details to register the application.

1. Name: `Hava`
2. Application Type: `Web`
3. Redirect URI: `https://app.hava.io/login`
4. Click `Register`

<figure><img src="https://3601125483-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Loco-kTiJ7Tu_lfPZqb%2Fuploads%2FXsqF6YVHRG0mbeC2J9hL%2FAzure_Portal_4.jpg?alt=media&#x26;token=5be4c7fb-efb0-4634-8e13-73354faa778c" alt=""><figcaption></figcaption></figure>

### Assign Roles to the Application

This will step you through adding a role for the application at the subscription level; this will grant Hava access to read everything in your account but not make any changes. You can also apply the access to a specific resource group or groups, or even individual resources - Hava will only draw the resources you give it access to.

1. Using the top search bar, Search for `Subscriptions`
2. Click and open Subscriptions from the search results

<figure><img src="https://3601125483-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Loco-kTiJ7Tu_lfPZqb%2Fuploads%2FUnAitUlTbMmmmsgQHBBV%2FAzure_Portal_5.jpg?alt=media&#x26;token=447824b1-f56c-4a22-aadb-2151e5b78f5b" alt=""><figcaption></figcaption></figure>

Select the subscription you would like to assign access to by clicking it.

<figure><img src="https://3601125483-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Loco-kTiJ7Tu_lfPZqb%2Fuploads%2FFSxo6UTxt4aY0vyH71VJ%2FAzure_Portal_6.jpg?alt=media&#x26;token=b17f8136-efe2-4f19-83fe-321b5dd6484c" alt=""><figcaption></figcaption></figure>

#### **Add a role assignment**&#x20;

1\. On the left menu click `Access control (IAM)`&#x20;

<figure><img src="https://3601125483-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Loco-kTiJ7Tu_lfPZqb%2Fuploads%2FhRqLqbIYUd0FMzXrqbF9%2FAzure_Portal_7.jpg?alt=media&#x26;token=eb85e55b-1d0d-44c8-abd1-0ca91d9a5503" alt=""><figcaption></figcaption></figure>

\
2\. Click `+ Add` \
3\. Then `Add role assignment`&#x20;

<figure><img src="https://3601125483-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Loco-kTiJ7Tu_lfPZqb%2Fuploads%2FGprrQL6ZmRhpeUghAt3i%2FAzure_Portal_8.jpg?alt=media&#x26;token=2531f890-32a5-4f50-8d17-392c74012f20" alt=""><figcaption></figcaption></figure>

\
4\. Set role to `Reader`&#x20;

<figure><img src="https://3601125483-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Loco-kTiJ7Tu_lfPZqb%2Fuploads%2F3PROIBrhEngsJqvnhJt1%2FAzure_Portal_9.jpg?alt=media&#x26;token=8d4318e5-cb9d-428d-b326-4b2eaa1d00fb" alt=""><figcaption></figcaption></figure>

\
5\. Select - Type in `Hava` now select Hava from the search results, and this should now be added to `Selected members:` <br>

<figure><img src="https://3601125483-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Loco-kTiJ7Tu_lfPZqb%2Fuploads%2FRtSNmGUC6GgzxAwY40Tj%2FAzure_Portal_10.jpg?alt=media&#x26;token=a10e277b-fb88-4d48-81e5-8d5cfaa961d7" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3601125483-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Loco-kTiJ7Tu_lfPZqb%2Fuploads%2FUsQQpKTK2CrXgHQ9hPMs%2FAzure_Portal_11.jpg?alt=media&#x26;token=0a614dbc-773b-4a44-8bfc-2452cfad128b" alt=""><figcaption></figcaption></figure>

6\. Click `Review + Assign`

### Get your parameters to give access to Hava

You will need four separate parameters to give Hava access to your account, first off is the subscription ID.

#### **Subscription ID**&#x20;

While still in the `Subscriptions` section.&#x20;

1\. Navigate to `Overview` \
2\. Copy the `Subscription ID` and paste into Hava.

<figure><img src="https://3601125483-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Loco-kTiJ7Tu_lfPZqb%2Fuploads%2F2m0KKaGqjiBu056pnE2h%2FAzure_Portal_12.jpg?alt=media&#x26;token=701f6fde-8825-42e8-8429-917fe8549221" alt=""><figcaption></figcaption></figure>

#### **Application ID and Tenant ID**

1. Search for `Entra ID`
2. Open Microsoft Entra ID
3. Click `App Registrations` from the side menu
4. Click and open `Hava` from the app registration list.

<figure><img src="https://3601125483-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Loco-kTiJ7Tu_lfPZqb%2Fuploads%2FneZ3KHW52WiE68Y4Duw8%2FAzure_Portal_13.jpg?alt=media&#x26;token=7a764482-dbfa-4862-ba2b-89eca7e7bd8c" alt=""><figcaption></figcaption></figure>

Here you will find the `Application ID` and `Tenant ID` to copy and paste into Hava.&#x20;

1\. Application ID \
2\. Directory Tenant ID

<figure><img src="https://3601125483-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Loco-kTiJ7Tu_lfPZqb%2Fuploads%2FqJqwjx4ZA6PJWQcYZ4AW%2FAzure_Portal_14.jpg?alt=media&#x26;token=e890caba-dc32-4544-9b32-3510c9945436" alt=""><figcaption></figcaption></figure>

### Create a Secret Key

1. Click on Certificates & secrets

<figure><img src="https://3601125483-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Loco-kTiJ7Tu_lfPZqb%2Fuploads%2Fn976ZPTkrayxRnyG7UXm%2FAzure_Portal_15.jpg?alt=media&#x26;token=3ea46337-ed3b-4e6e-bd53-ba4ab697be38" alt=""><figcaption></figcaption></figure>

1. Add  `+ New client secret`

<figure><img src="https://3601125483-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Loco-kTiJ7Tu_lfPZqb%2Fuploads%2FD80jmlmqGaacLFSNnvFh%2FAzure_Portal_16.jpg?alt=media&#x26;token=e429cdf3-1773-4806-90ed-a964f9fdbf87" alt=""><figcaption></figcaption></figure>

1. Description `HavaAccessKey` or any other description you like.
2. Set Expires to `24 Months`
3. Click `Add`

<figure><img src="https://3601125483-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Loco-kTiJ7Tu_lfPZqb%2Fuploads%2Fmdai7e4JK7cbxSdM7ri2%2FAzure_Portal_17.jpg?alt=media&#x26;token=70786fde-4b48-489b-9670-68954bbdf2a7" alt=""><figcaption></figcaption></figure>

&#x20;  6\. Copy and paste the `Secret Key Value` into Hava

<figure><img src="https://3601125483-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Loco-kTiJ7Tu_lfPZqb%2Fuploads%2F9zm1dSyNShE4fBeoXWbi%2FAzure_Portal_18.jpg?alt=media&#x26;token=88ecb0fc-950d-4c83-a3b6-b6bec3630e5e" alt=""><figcaption></figcaption></figure>

In Hava add source, select the Azure tab

<figure><img src="https://3601125483-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Loco-kTiJ7Tu_lfPZqb%2Fuploads%2Fn5g6qvMS8RAyXQqTNg4U%2FAdd_Azure_Credientials_to_Hava.jpg?alt=media&#x26;token=4a9223ca-82d1-4b28-bb0a-70b69fe9ae25" alt=""><figcaption></figcaption></figure>

Field 1 (Subscription ID) - Enter the Azure Subscription ID

Field 2 (Tenant ID) - Enter the Azure Hava App Directory Tenant ID

Field 3 (Client ID) - Enter the Azure Hava Application (Client) ID

Field 4 (Secret Key) - Enter the Azure Hava App Secrets access key **Value**

Choose a project (or set to Default)

Enter a name for the new source

Click Import and the environment import will start.
