> For the complete documentation index, see [llms.txt](https://docs.stoik.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stoik.io/prevention-tools/cloud-scan/azure.md).

# Setup: Azure Cloud

Give the Cloud scan read access to an Azure subscription by assigning reader roles to the Stoïk Cloud Scanner application.

## Prerequisites

* Servers and/or virtual machines hosted in Azure, and an administrator account.
* A technical advisor is required for initial configuration and ongoing supervision.
* One person does the whole setup, from start to finish: a Stoïk Protect user allowed to edit prevention tools, who is also an administrator of the Azure account. Most Azure failures come from two people splitting the flow.
* Signed in to a single Microsoft tenant: the one to scan. If the setup is stuck, restart it in a private browser window, signed in to that tenant only.

If you only have Office 365 or Entra ID licenses, see [Setup: Entra ID](/prevention-tools/cloud-scan/entra-id.md) instead.

## Setup

{% stepper %}
{% step %}

### Select Microsoft Azure

* If you haven't set a provider yet: go to `Cloud Scan` > `Launch Cloud Scan` > `Azure`.
* If you already have a provider: go to `Cloud Scan` > `Settings` > `New Provider` > `Azure`.

<figure><img src="https://2582414397-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDGGQ49Oui29Ft0kJjSm%2Fuploads%2FoQwu5YkYywfunHxjbihU%2Fstoik-protect-cloudscan-azure-setup.png?alt=media&amp;token=4f7d918d-4749-4216-b057-74fa267a6606" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Create new roles

<figure><img src="https://2582414397-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDGGQ49Oui29Ft0kJjSm%2Fuploads%2FOu6QiRSWQUTtmv8nipXf%2Fstoik-protect-cloudscan-azure-setup-step-one.png?alt=media&amp;token=3ee7937d-08ad-40da-b2c3-6b85e63075ec" alt=""><figcaption></figcaption></figure>

1. Go to the [Microsoft Azure portal](https://portal.azure.com/auth/login/) and log in with your administrator account.
2. Search for `Subscriptions` in the search bar, then click on the subscription to scan.

   <div align="left"><figure><img src="https://2582414397-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDGGQ49Oui29Ft0kJjSm%2Fuploads%2FGXhzLVcnk3NXmOSpBhc3%2Fazure-search-subscriptions.png?alt=media&amp;token=3811f8d2-b23e-4334-9d04-cf7b96c9552f" alt="" width="563"><figcaption></figcaption></figure></div>

   <figure><img src="https://2582414397-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDGGQ49Oui29Ft0kJjSm%2Fuploads%2FsdXPrOYAmq34SA053yB9%2Fazure-subscriptions.png?alt=media&amp;token=2cd4a6f4-ed6a-48a9-9c5d-1f7e69ab86ff" alt=""><figcaption></figcaption></figure>
3. Click `Access control (IAM)` in the left menu, then click `Add`, then `Add role assignment`.

   <figure><img src="https://2582414397-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDGGQ49Oui29Ft0kJjSm%2Fuploads%2FJWr92yL06LGvlAD7qpRS%2Fazure-subscriptions-add-role-assignment.png?alt=media&amp;token=3fd7955e-c481-4add-b739-c7c655e83d3a" alt=""><figcaption></figcaption></figure>
4. Search for the `Reader` role, select it, then go to the `Members` tab.

   <figure><img src="https://2582414397-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDGGQ49Oui29Ft0kJjSm%2Fuploads%2FMSN4E1BtIFsKsuAUEAy8%2Fazure-add-role-assignment.png?alt=media&amp;token=f7e63c9e-3f7b-4054-9c9f-91d96733c3cc" alt=""><figcaption></figcaption></figure>
5. Click `Select members`, search for `Stoïk Cloud Scanner`, select it, then click `Select`.

   <figure><img src="https://2582414397-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDGGQ49Oui29Ft0kJjSm%2Fuploads%2Fy4LLrmvERZiGT0x4kLQc%2Fazure-select-members-role-assignment.png?alt=media&amp;token=25861f02-defa-4f05-bfef-855ad3824b0c" alt=""><figcaption></figcaption></figure>
6. Click `Review + assign` twice to confirm.
7. Repeat steps 4 to 6 for the `Security Reader` and `Log Analytics Reader` roles.
   {% endstep %}

{% step %}

### Grant permissions

<div align="left"><figure><img src="https://2582414397-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDGGQ49Oui29Ft0kJjSm%2Fuploads%2Fgit-blob-f651e9e32a49814f6f3ca25e5bc9d9d065eea011%2FCapture%20d%E2%80%99%C3%A9cran%202026-05-27%20%C3%A0%2017.04.44.png?alt=media" alt="" width="563"><figcaption></figcaption></figure></div>

1. In the left-hand menu, go to `Microsoft Entra ID` > `Roles and administrators`.

   <figure><img src="https://2582414397-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDGGQ49Oui29Ft0kJjSm%2Fuploads%2Fgit-blob-04fc946096f95da5162151c5a51e74341bbb8967%2FCapture%20d%E2%80%99%C3%A9cran%202026-05-07%20%C3%A0%2017.23.34.png?alt=media" alt=""><figcaption></figcaption></figure>
2. Search for the `Global Reader` role and click on it.

   <figure><img src="https://2582414397-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDGGQ49Oui29Ft0kJjSm%2Fuploads%2Fgit-blob-a92451301f63e3b3c1d93cec35588d3169146816%2FCapture%20d%E2%80%99%C3%A9cran%202026-05-07%20%C3%A0%2017.24.23.png?alt=media" alt=""><figcaption></figcaption></figure>
3. Click `Add assignments`, search for `Stoïk Cloud Scanner`, select it, then click `Add`.

   <figure><img src="https://2582414397-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDGGQ49Oui29Ft0kJjSm%2Fuploads%2Fgit-blob-92d583a4bfc037d195a2c22e8a02fcff5b22f205%2FCapture%20d%E2%80%99%C3%A9cran%202026-05-07%20%C3%A0%2017.25.49.png?alt=media" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://2582414397-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDGGQ49Oui29Ft0kJjSm%2Fuploads%2Fgit-blob-9cdf09a562407940b88cde427056f5d424b7b2b3%2FCapture%20d%E2%80%99%C3%A9cran%202026-05-07%20%C3%A0%2017.28.49.png?alt=media" alt=""><figcaption></figcaption></figure>
4. Repeat steps 2 and 3 for the `Security Reader` role.

{% hint style="warning" %}
Do not grant additional rights such as `Global Secure Access Administrator`, otherwise it will not work.
{% endhint %}
{% endstep %}

{% step %}

### Complete setup

Click `Complete setup` in the Stoïk Protect console.

<div align="left"><figure><img src="https://2582414397-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaDGGQ49Oui29Ft0kJjSm%2Fuploads%2Fgit-blob-f651e9e32a49814f6f3ca25e5bc9d9d065eea011%2FCapture%20d%E2%80%99%C3%A9cran%202026-05-27%20%C3%A0%2017.04.44.png?alt=media" alt="" width="563"><figcaption></figcaption></figure></div>

{% hint style="info" %}
Refresh the Stoïk Protect page if necessary.
{% endhint %}
{% endstep %}
{% endstepper %}

## Several subscriptions

To scan several subscriptions, assign the three subscription roles (`Reader`, `Security Reader`, `Log Analytics Reader`) on each of them.

## Troubleshooting

<details>

<summary>The setup failed, then worked when I retried</summary>

New roles and permissions take a few minutes to apply on Azure. Wait 5 minutes and click again.

</details>

<details>

<summary>"Some roles are not configured correctly", or the setup goes back to the start</summary>

The check expects exactly the roles above: a missing role fails, and so does an extra one. Common mistakes:

* Permissions granted in Entra ID but roles never assigned.
* `Reports Reader` added as a role: remove it.
* `Entra Backup Reader` or a Global Secure Access role instead of `Security Reader`.
* `Monitoring Reader` instead of `Log Analytics Reader`.
* Roles on one subscription but not on the others.

Error messages use the English role names, even when your portal is in another language.

</details>

<details>

<summary>"Stoïk Cloud Scanner" can't be found</summary>

See ["Bad Tenant" error](/prevention-tools/cloud-scan/azure/bad-tenant.md).

</details>

<details>

<summary>Policy.Read.All cannot be granted, or a permission is missing</summary>

See [Policy.Read.All cannot be granted](https://docs.stoik.io/prevention-tools/cloud-scan/pages/o078MxFZGrJa3CHRphbh#policy.read.all-cannot-be-granted-or-a-permission-is-missing).

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.stoik.io/prevention-tools/cloud-scan/azure.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
