Thursday, 18 October 2012

Setting up Meet URLs in Lync Server 2010 Multitenant

In this article I'm going to explain how I solved the problem of setting up the tenant meet URLs correctly in Lync Server 2010 Multitenant Pack for Parner Hosting. Microsoft released a special version of Lync Server 2010 intended just for hosting organizations that want to provide Lync services to multiple distinct organizations.

The deployment guide for this scenario can be very confusing in some sections and it takes multiple reading as well as good Lync 2010 background to get it right. But I still believe that some procedures in the document are not correct. The section that gave me the most trouble was about setting up simple URLs for hosted organizations.

In on-premise installation of Lync 2010 there is usually one SIP domain and one set of simple URLs. However, in multitenant installation there are multiple SIP domains, one SIP domain for each tenant.

The deployment guide in one section states that one should use Topology Builder to setup the meet URLs for a tenant. In a dynamic environment like multitenant hosting where you would use custom built provisioning service to set up tenants, you cannot rely on Topology Builder. Furthermore, if you try to run the scripts offered for setting up meet URLs (section 8.11.3), you would get the following error:

There must be an Active URL for Meet for each SIP Domain.

What this actually means is that you cannot set up one Meet URL for one SIP domain and assign it to one tenant organization and do the same for each tenant. That would make sense but it does not work. What you must do is create Meet URLs for all SIP domains and assign them all to a single tenant. And you must do that for each tenant.

This is the script I first wrote following the deployment guide:

#get your tenant GUID
$TenORgID = xxxx-xxxx-xxxx-xxxx-xxxx

#assing a SIP domain to a variable
$SIPDomain1 = ""

#generate a base URL for your Meet URL
$URL1 =  "" + $SIPDomain1

#generate a Simple URL entry
$urlEntry1 = New-CsSimpleUrlEntry -Url $URL1

#generate a Simple URL for the meet component and assing all the variables
$simpleUrl1 = New-CsSimpleUrl -Component "meet" -Domain $SIPDomain1 -SimpleUrl $urlEntry1 -ActiveUrl $URL1

#assign the Simple URL to your tenant
Set-CsSimpleUrlConfiguration –Tenant $TenORgID -SimpleUrl @{Add=$simpleUrl1}  -ErrorAction Stop

If you wrote the same script it means you too followed the deployment guide. The script would work if you have only one SIP domain on the system, but if you have multiple SIP domains you would get the error above.

So, the solution is to modify the script to create Simple URLs for each SIP domain and assign all these Simple URLs to a single tenant. And you must do that for all your tenants. The good thing is that, as you add new tenants and create SIP domain for each tenant, you must create Simple URLs for all SIP domains that exist on your system at that time but you don't have to fix each and every tenant. So, for a single tenant system, you would only create one Simple URL. When you add your second tenant, you would create two Simple URLs and assign them to your second tenant, three Simple URLs for your third tenant and so forth. As you add your tenants, your Simple URLs list would grow for your new tenants but you won't have to go back and correct the previously added tenants.

So, for your second tenant, let's name him Fabrikam, you would have a script like this:

$TenORgID = xxxx-xxxx-xxxx-xxxx-xxxx

$SIPDomain1 = ""
$SIPDomain2 = ""

$URL1 =  "" + $SIPDomain1
$URL2 =  "" + $SIPDomain2

$urlEntry1 = New-CsSimpleUrlEntry -Url $URL1
$urlEntry2 = New-CsSimpleUrlEntry -Url $URL2

$simpleUrl1 = New-CsSimpleUrl -Component "meet" -Domain $SIPDomain1 -SimpleUrl $urlEntry1 -ActiveUrl $URL1
$simpleUrl2 = New-CsSimpleUrl -Component "meet" -Domain $SIPDomain2 -SimpleUrl $urlEntry2 -ActiveUrl $URL2

Set-CsSimpleUrlConfiguration –Tenant $TenORgID -SimpleUrl @{Add=$simpleUrl1,$simpleUrl2}  -ErrorAction Stop

But of course, in a dynamic environment you must have more automated way of creating Meet URLs for new tenants. So I wrote the following script:

$OUName = "IT Solution Braindumps"
$PathRoot = "OU=OCS Tenants,DC=cloud,DC=local"
$TargetOU = "OU="+$OUName+","+$pathRoot
$TenantOU = Get-ADOrganizationalUnit -Identity $TargetOU -Properties msRTCSIP-TenantId -Server ""
$TenORgID = New-Object -TypeName System.guid -ArgumentList $TenantOU.ObjectGUID

$Count = 0

$SIPDomain = @()
$URL = @()
$URLEntry = @()
$SimpleUrl = @()

$siparray = Get-CsSipDomain

foreach($sip in $siparray)
 $SIPDomain += $sip.Identity
 $URL += "" + $SIPDomain[$Count]
 $URLEntry += New-CSSimpleUrlEntry -Url $URL[$Count]
 $SimpleUrl += New-CsSimpleUrl -Component "meet" -Domain $SIPDomain[$Count] -SimpleUrl $URLEntry[$Count] -ActiveUrl $URL[$Count]

Set-CsSimpleUrlConfiguration -Tenant $TenORgID -SimpleUrl @{Add=$SimpleUrl} -ErrorAction Stop

After the script executes you will get the following warning:

WARNING: Activation (Enable-CsComputer) may need to be re-run on impacted Front End servers.

Execute Enable-CsComputer and you are done.

The previous script fully automates generation of Simple URLs based on all existing SIP domains on a system and assignes them all to a tenant. When adding new tenant to your Lync 2010 hosting environment you can just automatically run this script.

Once you setup your tenant Meet URLs correctly, the tenant users would be able to succesfully schedule Online Meetings from Outlook and the meeting URL for other users to connect would be correctly populated.


There is one more thing to do. Tenant users must be configured with the correct Base URL for their tenant organization. Base URL is configured on the msRTCSIP-BaseSimpleUrl property for each tenant user in Active Directory. Here is how to do that:

$SIPDomain = ""
$CompanyName = "IT Solution Braindumps"
$BaseURL = ""+$SIPDomain
$PathRoot = "OU=OCS Tenants,DC=cloud,DC=local"
$TargetOU = "OU="+$CompanyName+","+$PathRoot
$OUObject = Get-ADOrganizationalunit -Identity $TargetOU

Get-ADUser -LDAPFilter "(objectClass=user)" -SearchBase $TargetOU -Properties msRTCSIP-BaseSimpleUrl -Server "" |Set-ADUser -Replace @{'msRTCSIP-BaseSimpleUrl'=$BaseURL}

Without setting this property your users would get this error when they click on the meet URL:

Error: Meeting URL is not valid.

Lync Server 2010 Logging Tool will also return this error:

Failed to find a domain mapping for this BaseURL

So you need to make sure that msRTCSIP-BaseSimpleUrl is set at the moment you provision tenant users.

There it is, I hope I made it clear enough for you to be able to set Meet URLs for tenant organizations in Lync. If you have troubles getting this to work please let me know. Also, if you have a better way to solve this problem, please share it here. I'm not going to exclude a possibility that I got everyhing wrong, but this is a configuration that works in my environment.


  1. Brilliant. Saved my hours of work! :)

  2. Sorry could you show all the bits that need to be changed when running this? I have run this over but I'm still having issues with meet. just want to 100% make sure im running this correctly as no errors come from the script.

    Issue is the url is not being formed when meeting is started saying:
    "a user tried to create a conference with no simple url of type meet available"

    however when I look up the domain they are listed.

    Thank you

  3. I'm having the same issue as Steven, but on Lync Hosting 2013, rather than 2010.
    All the correct rules are there, but Enable-CsComputer tells me it can't find any Simple urls and skipping the steps.

    Any one have comment for this regarding Hosted Lync 2013?

    Thank you

    1. Did you manage to get this resolved? I have the same problem. thanks

  4. Hello everyone.
    I must say that some of the recommendations in my post are wrong. They did work for me in our environment but the setup is wrong because initially I thought it is possible to have base meeting URLs customized for resellers. In that way I wanted to have for one reseller and for another. It was not possible however and I had to dig a little deeper in the meeting URLs problem.

    Those of you who have Lync 2010 hosting pack should really follow guidance for Lync 2013 even if you are really installing Lync 2010 because there is some additional info there.

    The main thing to note is that this script must work:

    $TenantName = "TenantName"
    $PathRoot = "OU=OCS Tenants,DC=domain,DC=local"
    $TargetOU = "OU="+$TenantName +","+$PathRoot
    $TenantOU = Get-ADOrganizationalUnit -Identity $TargetOU -Properties msrTCSIP-TenantId
    $TenOrgID = New-Object -TypeName System.guid -ArgumentList $TenantOU.ObjectGUID

    $TenantSIPDomain = ""
    $BaseMeetingURL =
    $NewMeetingURL = "" + $TenantSIPDomain
    $URLEntry = New-CsSimpleUrlEntry -Url $NewMeetingURL
    $SimpleURL = New-CsSimpleurl -component "meet" -Domain $TenantSIPDomain -SimpleUrl $URLEntry -ActiveUrl $NewMeetingURL
    Set-CsSimpleUrlConfiguration -Tenant $TenOrgID -SimpleUrl @{Add=$simpleUrl}

    If this script returns an error than there is something wrong in the setup. The most important peace of information is that you should set AllowAllDomains to true in your topology xml file. You can find this information in the Lync 2013 hosting guide.

    If you already have configured meeting URLs in your Lync setup you should delete them all and start from scratch. The easiest way for me was to open XDS database, dbo.Item table and delete all SimpleURL associations for tenant organizations.

    I managed to configure two separate Lync 2010 hosting environments and they all work fine and I am able to setup meeting URLs using the script above. These days I will configure Lync 2013 hosting environment and I will post my steps in this blog.

    If you still have problems, feel free to contact me, I will be happy to help.

  5. This comment has been removed by the author.

  6. So, what happens when you need to add additional lync users to a tenant OU? Do I need to run the GetAdUser and Set commands again to apply all of the attributes? Or since the attributes are already set for the OU, it will automatically be applied to the users?

    Also, do you know if it possible to separate users in the address book if they are in the same OU?