New-CsOnlineApplicationInstance: this cmdlet is for online domain only

Issue

The following error is encountered when creating a new Application Instance in Teams using the New-CsOnlineApplicationInstance cmdlet.

New-CsOnlineApplicationInstance -UserPrincipalName TestQueue1@x500.co.uk -ApplicationId 11cd3e2e-fccb-42ad-ad00-878b93575e07 -DisplayName "Test Queue1"
WARNING: Attention: On-premises domain must use on-premises cmdlet. Please copy and paste the below commands and run them with appropriate admin privileges in your on-premises Skype for Business environment.

WARNING: New-CsHybridApplicationEndpoint -ApplicationId 11cd3e2e-fccb-42ad-ad00-878b93575e07 -DisplayName "Test Queue1" -SipAddress TestQueue1@x500.co.uk -OU [A_VALID_OU]

This cmdlet is for online domain only. Please run corresponding on-premises cmdlets for on-premises domain.

+ CategoryInfo : InvalidOperation: (:) [New-CsOnlineApplicationInstance], InvalidOperationException
+FullyQualifiedErrorId : Microsoft.Rtc.Management.Hosted.PlatformService.ApplicationInstance.NewCsOnlineApplicationInstanceCmdlet
+ PSComputerName : admin2e.online.lync.com

Resolution

This happens for two reasons I know of.

Hybrid

A Lync/Skype for Business Server & Skype for Business Online exists, where shared SIP address space is enabled in the Office 365 tenant.

Options:

  • Create the Application Instance using the @onmicrosoft.com domain, e.g. -SipAddress TestQueue1@x500labs.onmicrosoft.com

or

  • Create the Skype for Business application endpoint in Skype for Business Server using the following cmdlet. This cmdlet was introduced in the July 2017 CU of Lync Server 2013 & May 2017 CU of Skype for Business Server 2015. It will be copied to Skype for Business Online via directory synchronisation (Azure AD Connect sync).
New-CsHybridApplicationEndpoint -ApplicationId 11cd3e2e-fccb-42ad-ad00-878b93575e07 -DisplayName "Test Queue1" -SipAddress sip:TestQueue1@x500.co.uk -OU "ou=RelevantOU,dc=x500,dc=co,dc=uk"

DNS

In a pure cloud Teams deployment (i.e. no hybrid), I have seen this issue occur if public DNS records aren’t configured for the domain.

DNS records required for Skype for Business Online & Teams:

DNS recordValue to use
SRVService: sipfederationtls
Protocol: TCP
Priority: 100
Weight: 1
Port: 5061
Target: sipfed.online.lync.com
SRVService: sip
Protocol: TLS
Priority: 100
Weight: 1
Port: 443
Target: sipdir.online.lync.com
CNAMEAlias: sip
Target: sipdir.online.lync.com
CNAMEAlias: lyncdiscover
Target: webdir.online.lync.com

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 )

Google photo

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

Twitter picture

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

Facebook photo

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

Connecting to %s