Monthly Archives: April 2017

New Skype Phone Number Assignment: Failed to Return Unique Result

This is a post that mostly serves as a PowerShell reminder to myself, but the long and short is that I had a client attempting to add a new user with a phone number that they believed wasn’t assigned anywhere.  They had run their favored scripts that list all numbers but were coming up short as to why Skype was blocking them from adding the user.

PS C:\Users\AnthonyCaragol\Desktop> .\Lync_Common_Area_Phone_Tool_v1_2.ps1
 New-CsCommonAreaPhone : Filter failed to return unique result, "[LineURI :
 tel:+16305551212] [PrivateLine : tel:+16305551212] "

As it turns out, and I can’t say how or why at this time (comment if you have a guess), but the account was removed from Lync at some point but the attributes were left behind.    In these situations, the commands I use to trace the line to a user object is as follows (where 5551212 is the number):

get-aduser -filter {msRTCSIP-Line -like "*5551212*"}
get-aduser -filter {msRTCSIP-PrivateLine -like "*5551212*"}

Update:  Jeff Brown has fought issues like this before as well, and has taken the fight right into the databases, see his encounter here – https://www.jeffbrown.tech/single-post/2014/11/01/Cleaning-Up-Leftover-Lync-Accounts

 

Move-CSUser returns “Index was outside the bounds of the array”

This is a simple but confusing one my clients have had various issues with, so I thought I’d write something up quickly.  You’re moving Lync or Skype for Business Server users to Skype for Business Online in Office 365.  During the move operation you receive an error similar to the following:

Move-CsUser : Index was outside the bounds of the array.
At line:1 char:1
+ Move-CsUser -Identity "John User" -Target sipfed.online.lync.com
-Credential $ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~
    + CategoryInfo          : InvalidOperation: (CN=John User,...=contoso,DC
   =com:OCSADUser) [Move-CsUser], IndexOutOfRangeException
    + FullyQualifiedErrorId : MoveError,Microsoft.Rtc.Management.AD.Cmdlets.Mo
   veOcsUserCmdlet

Not the most helpful error and definitely confusing.  Nine times out of ten, this error is simply telling you that either A) You don’t have the permissions you think you do or B) The user isn’t licensed for what you’re trying to accomplish in the cloud (likely the case if it’s only affecting a single user or a few).

Checking B is easy, login to your O365 portal and ensure that the user has the correct licensing.  Don’t just assume because E1, E3, or E5 is on, that Skype is individually checked.  Double check when the user fails to move.

Checking A is a little more difficult.  You need to ensure that the account(s) you’re using have full access to move the user both on-premises, and into Skype Online.  When in doubt, use a CSAdministrator on-premises and Global Administrator account in Office 365 to test if this is the issue.  Please not that you don’t need the above maximum rights to move users, but it will help you eliminate variables to identify the source of the issue and help you move forward.

It’s also been noted (thanks Mark Vale) that when DirSync or Azure AD Connect is installed prior to Skype or Lync, the attributes may not be properly syncing to/from the tenant as they’re not automatically added with a later Skype installation.  Perhaps you’re using a third party IDM and missed these attributes entirely.  You will need to reconfig AAD Connect or your sync tool of choice to get these added in properly.

Beyond that, we’ve even seen issues with an incorrectly provisioned SQL rights pop up, and a few other oddities, but hopefully this moves you along on your path to the cloud.