Delete Tenants on Orchestrator

How to delete a tenant on Orchestrator?

The following SQL statement will mark a tenant deleted: 

update Tenants
set IsDeleted = 1, IsActive = 0
where TenancyName = 'NameOfTenantYouWantToDelete'

The tenant can re-activated because the record will not be deleted from the database.

If deletion of a tenant from database is required, following steps can be performed: 
  1. Remove all objects like Machines, Robots and Processes from the Tenant that are needed to be removed. Also remove the license.
  2. Logon as a tenant admin to the Orchestrator
  3. Open the following url, which is the API endpoint :  https://[orchestrator machine name]/swagger/ui/index
  4. Open the Tenants section
  5. Open [get /odata/Tenants] and click [Try it out!]. List of all tenants is returned. Find the tenant ID of the target tenant to remove
  6. Open [delete /odata/Tenants({Id})] and specify the tenant ID in the ID parameter, click [Try it out!]

A post was split to a new topic: On obtaining Authentication popup window for the OData url’s, what is the account to login as?