无法为本地已掌握的目录同步对象更新指定的属性-更新Azure广告中的用户管理器属性

已经详尽地寻找解决方案,我希望获得一些指导。

我希望更新在本地广告中填充的用户管理器属性,但据我所知,azure / 365不会复制此属性。

因此,我将不得不使用以下代码手动更改它们;

Set-AzureADUserManager -ObjectId "usersid" -RefObjectId "managersid"

一旦我运行它,它将失败,并出现以下错误;

Code: Request_BadRequest
Message: Unable to update the specified properties for on-premises mastered Directory Sync objects or objects currently undergoing migration.
RequestId: 
HttpStatusCode: BadRequest
HttpStatusDescription: Bad Request
HttpResponseStatus: Completed
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   + CategoryInfo          : NotSpecified: (:) [Set-AzureADUserManager],ApiException
   + FullyQualifiedErrorId : microsoft.Open.AzureAD16.Client.ApiException,microsoft.Open.AzureAD16.PowerShell.SetUserManager

我不确定这是什么问题,因为用户管理器已与Windows广告作为源同步地进行了天蓝色同步。

谢谢。

shuishuiwoai 回答:无法为本地已掌握的目录同步对象更新指定的属性-更新Azure广告中的用户管理器属性

根据the docsManager属性 已同步。

此处的GetSet cmdlet都需要{{1}的DistinguishedNameObjectGUIDObjectSIDSamAccountName }和-Identity参数。

您应该能够:

-Manager

在那之后,您可以使用以下命令强制执行A​​D同步:

# set the manager property for the user
Get-ADUser -Identity "<THE USER>" | Set-ADUser -Manager "<THE MANAGER>"

您还可以通过使用$server = 'YourAzureConnectServer' $cred = Get-Credential -Message 'Please enter user name and password for AD Sync' $session = New-PSSession -ComputerName $server -Credential $cred Invoke-Command -Session $session { if (Get-ADSyncConnectorRunStatus) { Write-Warning "A sync is already in progress. Please try again later." } else { Write-Host "Initializing Azure AD Delta Sync..." -ForegroundColor Yellow try { Start-ADSyncSyncCycle -PolicyType Delta -ErrorAction Stop Write-Host "Waiting for Sync to start.." # give the Sync Connector 10 seconds time to start-up Start-Sleep -Seconds 10 Write-Host "Waiting for Sync to finish.." While(Get-ADSyncConnectorRunStatus) { Write-Host "." -NoNewline Start-Sleep -Seconds 5 } Write-Host Write-Host "Azure AD Sync has finished." -ForegroundColor Green } catch { Write-Error $_ } } } Remove-PSSession $session

来强制完全属性同步 ,

好像我需要向“同步规则编辑器”中添加同步规则-我遵循以下内容-[链接](blog.kloud.com.au/2016/11/14/…)-我添加了一个同步规则在ad和azure之间,然后再返回,这似乎已经解决了问题,从而消除了对ps脚本的需要。 -再次感谢@theo的帮助。 –

本文链接:https://www.f2er.com/2824627.html

大家都在问