There are multiple ways you can find an Office 365 Tenant ID, however I have found the easiest way is to use the following commands;
Connect-MsolService
Get-MsolAccountSku
|
The output from the Get-MsolAccountSku command displays the Tenant ID in it's text value. Many of the guides online state the method to find the alphanumeric value. I have not found any commands that will not accept the text value.