Microsoft Teams – Direct Routing: Error “Filter failed to return unique result” (duplicated phone number – duplicated DDI or duplicated DID)

When enabling a user to Microsoft Teams Direct Routing (let’s say with a phone number – DDI “+44zzzzzzzzzz”) you could have the following error:

Filter failed to return unique result, “[SipAddress : sip:yyyyy@xxxx.com] [LineURI :
tel:+44zzzzzzzzzz] [PrivateLine : tel:+44zzzzzzzzzz] “
+ CategoryInfo : InvalidOperation: (Set-CsUser:String) [Set-CsUser], InvalidOperationException
+ FullyQualifiedErrorId : ProcessRecord,Microsoft.Rtc.Management.AD.Cmdlets.SetOcsUserCmdlet
+ PSComputerName : api.interfaces.records.teams.microsoft.com

The error is usually due to the phone number (DDI) being already assigned to another user.
To identify who is the user with the DDI assigned you can use the script below

Get-CsOnlineUser -Filter {OnPremLineUri -eq “tel:+44zzzzzzzzzz”}| select firstname,lastname,UserPrincipalName,LineURI,tenantdialplan

You will have a result similar to the one below. Remove the DDI from the wrong user to fix the issue


Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.