Office 365 - Tenant Availability Check

How to check if an Office 365 Tenant name is available. This can be done via a website or powershell.

 
 
 
 
 
(0)
Add to favorites
Office 365
3/15/2018
E-mail Twitter del.icio.us Digg Facebook
  • It appears that the URI no longer functions.
    2 Posts | Last post January 16, 2020
    • Will there be an update?  This no longer works.
    • I found the same. 
      
      However you could use a similar PowerShell function with the https://o365.rocks API instead.
      
      For instance (error correction is less than ideal):
      
      Function get-tenantstatus{ 
          param( $name ) 
       
       
          Function Usage{ 
              write-host -ForegroundColor Red "You didin't provide a Tenantname. Please restart the script and provide the desired tenantname." 
          } 
       
           
          If (-not $name) {Usage;Exit} 
       
          $uri = "https://o365.rocks/home/check"
          $body = @"
                  {
                      'name':'$name'
                  }
      "@
          $response = @()        
          $response = Invoke-RestMethod -Method Post -Uri $uri -Body $body -ContentType "application/json"
       
          $valid = $null -eq $response.available
          if ($valid -eq $true){
              Write-Host -ForegroundColor Red "Error"
              exit
          }
      
          $available = $null -ne $response.available
          if ($response.available -like "true") { 
              Write-Host -ForegroundColor Green -BackgroundColor Black "`n`n`nThe tenantname $name is currently still available!`n`n`n" 
              pause 
          } else { 
              Write-Host -ForegroundColor red -BackgroundColor Black "`n`n`nThe tenantname $name is curently in use, please try another name.`n`n`n"
          } 
      }