Pages

Thursday, October 29, 2020

Enabling user for Teams Enterprise Voice fails with: "Management object not found for identity"

Problem

You’ve signed into Office 365 with the appropriate PowerShell modules and cmdlets:

Import-Module SkypeOnlineConnector

$sfbSession = New-CsOnlineSession

Import-PSSession $sfbSession

… and proceed to use the Set-CsUser cmdlet to enable a user for Teams Enterprise Voice but it fails with the following error:

PS C:\> Set-CsUser -Identity mesheiah@contoso.com -EnterpriseVoiceEnabled $true -HostedVoiceMail $true -OnPremLineURI tel:+7324

Management object not found for identity "mesheiah@contoso.com".

+ CategoryInfo : NotSpecified: (:) [Set-CsUser], ManagementException

+ FullyQualifiedErrorId : Microsoft.Rtc.Management.AD.ManagementException,Microsoft.Rtc.Management.AD.Cmdlets.SetO

csUserCmdlet

+ PSComputerName : admin0b.online.lync.com

The user being enabled for Teams Enterprise Voice has been previously enabled for an on-premise Skype For Business Enterprise Voice so you use the following cmdlet to list the uri properties and notice that the LineURI is still configured with the on-premise deployment:

PS C:\> Get-CsOnlineUser -Identity mesheiah@contoso.com | FL *uri

OnPremLineURI :

LineServerURI :

LineURI : TEL:+14165555555;ext=1324

image

Including the OnPremHostingProvider to the cmdlet will display the following SRV: value for it:

image

Attempting to use the Set-CsUser cmdlet to configure the LineURI to null will fail:

PS C:\> Set-CsUser -Identity mesheiah@contoso.com -LineURI $null Unable to set "LineURI". This parameter is restricted within Remote Tenant PowerShell.

+ CategoryInfo : InvalidArgument: (:) [Set-CsUser], ManagementException

+ FullyQualifiedErrorId : LineURI,Microsoft.Rtc.Management.AD.Cmdlets.SetOcsUserCmdlet

+ PSComputerName : admin0b.online.lync.com

PS C:\>

image

You’ve confirmed that the user has been removed from the on-premise Skype for Business Server.

Solution

One of the possible reasons why this error would be thrown is if the user account still has the msRTCSIP-DeploymentLocator attribute populated with the SRV: value:

image

This attribute and its value is required for the on-premise Skype for Business configuration but would prevent the user account that is synced into Azure AD to be enabled for Teams Enterprise Voice. To correct the issue, simply open the properties and Clear the value:

imageimage

Issue a synchronization between the on-premise AD and Azure AD:

Start-ADSyncSyncCycle -PolicyType Delta

Wait for a few minutes and the account should have the LineURI and OnPremHostingProvider attributes empty.

image

image

Proceeding to enable the account for Enterprise Voice will now complete.

2 comments:

Michael said...

Excellent! Thank you so much!

Travis Juhr said...

Terence, this has been an invaluable fix that I've been banging my head on for weeks. Great find within the AD structure on why previously on-prem users can't migrate to Teams.

OUTSTANDING!