Skype4B Online PowerShell Error: The specified tenant could not be found in current forest

Recently, I was working with a customer attempting to connect to Skype for Business Online PowerShell in order to configure Hybrid (aka Split Domain). We ran into a PowerShell error that I have never encountered before and my searches yielded zero results.

Here is the error that we got after running the following command:

$session = New-CSOnlineSession –Credential $Credentials –OverrideAdminDomain “TenantName.onmicrosoft.com”

Lync-Powershell-Error-Cropped

“Processing data from remote server admin0b.online.lync.com failed with the following error message: The specified tenant tenantname.onmicrosoft.com’ could not be found in current forest. Please verify the tenant identity and then try again.”

The error clearly states the Skype4B forest (‘admin0b’) it is trying to connect to is not correct. To verify our tenant’s forest address, I went to the Office 365 Admin Center and navigated to the Skype for Business admin page – low and behold, the browser address was ‘admin2a’.

Tenant-Browser

Now we can see that the PowerShell session was indeed connecting to the incorrect Skype4B forest.

To overcome this, the ‘New-CSOnlineSession’ cmdlet has the ‘OverridePowerShellUri’ parameter to specify a PowerShell address.

In order to populate the PowerShellUri, we needed take the admin URL – https://admin2a.online.lync.com/ and add ‘ocspowershellliveid‘ to the end.
https://admin2a.online.lync.com/ocspowershellliveid
The complete command:

$session = New-CSOnlineSession –Credential $Credentials –OverrideAdminDomain “TenantName.onmicrosoft.com” –OverridePowershellUri "https://admin2a.online.lync.com/ocspowershellliveid" -Verbose

 

This is a workaround as I have yet to hear of a permanent solution from Office 365 support.

*Note – that the forest names presented here may not match with your situation.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.