Create new environment errors & solutions

Table of Contents



You can create a new Workspace environment using our PowerShell script. However, PowerShell may return an error while trying to create a new environment. This article points out some error messages and solutions.


Errors & Solutions

Error: (415) Unsupported media type

Explanation: an old version of the PowerShell script has been used to create a workspace environment.


  1. Download the latest version of the PowerShell script to create a new Workspace environment.
  2. Verify in Azure whether an App Registration has been made for the environment already. If yes, delete if. Otherwise you will get the error "WARNING: An application for this workspace already exists. Cannot continue" on your next attempt.
  3. Try to create the environment again using the latest version of the script.


"WARNING: An application for this workspace already exists. Cannot continue"

Explanation: when you run the PowerShell script, you automatically create an App Registration in Azure for the new Workspace environment. This error messages indicates that the App Registration already exist in Azure AD. 

Solution: go to Azure AD, delete the existing App Registration and try again.


"WARNING: The requesting user has no email configured, cannot continue"

Explanation: the Azure Global Admin is the "requesting user". In this scenario, the user account does not have a valid Exchange license assigned. A valid Exchange license is a prerequisite for creating a new Workspace environment.

Solution: assign the Azure Global Admin a valid Exchange license (wait for provisioning to complete) and try again.


"The remote server returned an error: (404) Not Found"

Explanation: the hostname in the PowerShell script is not defined correctly or empty. The hostname must match with the provisioning key.

Solution: check if the $hostname has been filled in correctly, e.g. ''. Do not note down Workspace environment name.


"The remote server returned an error: (403) Forbidden"

Explanation: the provisioning key in the PowerShell script is not defined correctly or empty. The provisioning key must match with the hostname.

Solution: the provisioning key is given before the launch (technical onboarding) of the Workspace 365. It is highly sensitive information and should be known within your organization. Check your email or get in contact with your colleagues first. If the key cannot be found, you may submit a support ticket.


"The remote server returned an error: (400) Invalid request"

Explanation: there's already an existing Workspace 365 environment with the name you provided in the script. All environment names must be unique.

Solution: choose a different name for the environment.


"Request aborted: Could not create secure SSL/TLS-channel"

Explanation: this error message occurs when an invalid hostname has been filled in.

Solution: check if the hostname is valid by typing the hostname URL in your browser. An invalid hostname will indicate that the site cannot be reached and that the connection to the site is not secure. Verify you have entered the correct hostname in the script. Do not enter your partner record.


"Request aborted: Connection closed unexpectedly" (using stored configuration)

Explanation: PowerShell can show the stored information that is being used to create the new Workspace environment. This is the Workspace URL and provisioning key. This error message can occur when the hostname URL or provisioning key has changed. The script may still contains an old "saved key". 


  1. Delete the 'SavedKey.cfg' file.
    This file is located in the same folder as the script to create an environment.
  2. Go to Azure AD and delete the created App Registration.
  3. Try again. 


"The underlying connection was closed: An unexpected error occurred on a send"

Explanation: an incorrect hostname was entered when running the script. For example, you may have entered your partner record (, this is incorrect.

Solution: enter the correct hostname for your instance.


"An error occurred attempting to create the Azure App Registration"

Explanation: if there's little time (a few hours) between the creation of the Azure AD tenant and creating the Workspace environment, you will see this error message (the "AzureAppDetails" cannot be retrieved). 

Solution: wait 24 hours and try again. 

Back to top