Cloud Scan - Error - BAD TENANT

When running the automatic script for the ‘Cloud Scan’ tool, the following error may appear:

BAD TENANT - Stoik Cloud Scanner application not found, please see this link for more information :

This error occurs when the Stoik application has not been registered correctly on your Azure environment. The main reason for this is that a different environment was selected during the first stage of setting up the cloud scan and when the script was run.

The example below illustrates a problematic setup:



1. The user selects the provider ‘Microsoft Azure

 


2. The user selects their ‘xavier@bar.test’ account associated with the tenant bar.test

3. The ‘Stoïk Cloud Scanner’ application asks to register on the tenant ‘bar.test

4. The user tries to run the script on the tenant ‘foo.test’ (shown at the top right of the image)

 

As the ‘Stoïk Cloud Scanner’ application was authorised on another environment in step 2, it is normal that the script cannot assign the necessary roles.

Solutions

Run the script on the same Azure tenant that was used in step 2 above.

In case of doubt or if you are not sure which tenant was used during this step, first disconnect from all your accounts on https://portal.azure.com and restart the installation of the tool on StoikProtect or contact Stoik support.