# Hoe beheer je een "Bad Tenant"-fout in Microsoft Azure?

Wanneer het automatische script voor de Azure Cloud-scan wordt uitgevoerd, kan de volgende fout verschijnen:

`BAD TENANT - Stoïk Cloud Scanner-toepassing niet gevonden, raadpleeg deze link voor meer informatie`

Deze fout treedt op wanneer de **Stoïk-toepassing niet correct is geregistreerd in uw Azure-omgeving**. De belangrijkste reden is dat tijdens de eerste fase van de installatie en toen het script werd uitgevoerd een andere omgeving is geselecteerd.

## Voorbeeld

Het onderstaande voorbeeld illustreert een problematische configuratie:

{% stepper %}
{% step %}

### Selecteer de provider

De gebruiker selecteert de provider `Microsoft Azure`.

<figure><img src="/files/5f5a51cdd09c8e292b145b68db274e8a87fe5713" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Kies het account

De gebruiker selecteert zijn `xavier@bar.test` account dat is gekoppeld aan de tenant `bar.test`.

<figure><img src="/files/29a9c8a740db2c309364240d9591ffbf4dfc2f70" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Aanvraag voor app-registratie

De Stoïk Cloud Scanner-toepassing vraagt om registratie op de tenant `bar.test`.

<figure><img src="/files/562f28bd2c6d0d9b9dc717abfd8c4502c25e26a0" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Script uitgevoerd op een andere tenant

De gebruiker probeert het script uit te voeren op de tenant `foo.test` (weergegeven rechtsboven in de afbeelding). Omdat de Stoïk Cloud Scanner-toepassing op een andere tenant is geautoriseerd (`bar.test`), kan het script de nodige rollen niet toewijzen op `foo.test`.

<figure><img src="/files/5162c7b78353aa303402cd47cbf2622644e2c7c7" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

## Oplossingen

* Voer het script uit op dezelfde Azure-tenant die werd gebruikt bij het autoriseren van de Stoïk-toepassing (de tenant die is geselecteerd in stap 2 hierboven).
* Als u niet zeker weet welke tenant is gebruikt:
  * Meld u af bij al uw accounts op <https://portal.azure.com>.
  * Start vervolgens de installatie van de tool opnieuw op Stoïk Protect.

{% hint style="info" %}
Als het probleem aanhoudt, neem contact op met Stoïk via <protect@stoik.io> voor verdere assistentie.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.stoik.io/help/help-nl/preventietools/what-is-the-cloud-scan/cloud-scan-setup-azure-cloud/how-to-manage-a-bad-tenant-error-on-microsoft-azure.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
