Skip to content

Remove Azure environments

You can remove your Microsoft Azure environment from Sophos Cloud Optix.

You need to remove components from both Sophos Cloud Optix and Microsoft Azure.

If you still have access to your Sophos Cloud Optix account, see Remove an environment manually.

If you don't have access to your Sophos Cloud Optix account, for example if your free trial has ended, you can remove Sophos Cloud Optix components from your Azure environments with a script we provide. We remove your Sophos Cloud Optix account data automatically 30 days after your account expires. See Remove an environment using a script.

If you want to add the same Microsoft Azure environment again later, using a different Sophos Cloud Optix account, contact Support for help.

Remove an environment manually

You can use these instructions if you have access to the Sophos Cloud Optix account for the environment.

To remove your Microsoft Azure environment, do as follows:

  1. Sign in to your Sophos Cloud Optix account.
  2. Click Environments.
  3. In the list, find the environment you want to remove and click the trashcan icon Trashcan icon..
  4. Copy the commands shown. You'll need them later.
  5. Confirm that you want to continue. Click OK.
  6. In Microsoft Azure:
  7. Sign in to your Microsoft Azure portal.

    Note

    You need to be a user with at least the Owner role in the subscription and Application Administrator rights in Microsoft Entra ID (formerly Azure AD).

  8. Start Cloud Shell and select the PowerShell environment.

  9. Paste in and run the first command from the instructions you copied earlier.
  10. Paste in and run the second command.

    When you're prompted, choose whether or not to disable the network watcher and flow logs.

    Wait for the script to finish running.

  11. To check that the script has successfully removed Cloud Optix components from your Microsoft Azure environments, do as follows:

  12. Go to Azure Active Directory and open App Registrations.
  13. Select All apps from the drop-down menu and search for "Avid".
  14. If there are any apps called AvidSecure Monitor App, manually delete them.

Remove an environment using a script

You can download and run a Microsoft Azure Cloud Shell PowerShell script to remove environments from Microsoft Azure.

You must only use this method if you can't access Sophos Cloud Optix or the relevant Sophos Cloud Optix account.

To remove your Microsoft Azure environment from Sophos Cloud Optix, do as follows:

  1. Sign in to your Microsoft Azure portal.
  2. Start Cloud Shell and select the PowerShell environment.

    Note

    These commands won't work with PowerShell on your local computer.

  3. Enter the following command to download the script:

    curl -O "https://avidcore.s3-us-west-2.amazonaws.com/azure/delete-azure-app.ps1"

  4. Enter the following command to run the script:

    cd ; ./delete-azure-app.ps1

    When you're prompted, choose whether or not to disable the network watcher and flow logs.

When you've removed all your environments from Microsoft Azure, you must also remove the app AvidSecure Monitor App 999x9 from app registration in Microsoft Entra ID. All the Sophos Cloud Optix resources in your Microsoft Azure environment are now deleted.

We remove your Sophos Cloud Optix account data automatically 30 days after the account expires.