用于检索Office 365用户的同步类型的PowerShell方法?

问题描述 投票:1回答:3

在portal.office.com上,活动用户列表显示“同步类型”列,该列可以“与Active Directory同步”或“在云中”。可以使用PowerShell作为Azure AD用户的属性(例如,使用Get-MsolUser)检索此“同步类型”。

此外,是否可以强制标记为“In Cloud”的用户与具有相同userPrincipalName的本地Active Directory用户同步?

powershell azure active-directory office365 azure-active-directory
3个回答
0
投票

同步类型是office应用程序的属性,而不是AzureAD用户的属性。因此,您无法以这种方式检索它。

只要用户名是唯一的,您就可以在AzureAD中同步用户。


0
投票

可以从属性的LastDirSyncTime属性生成“同步类型”列。如果它是空的,那么它从未被同步并且可以显示为“In Cloud”。如果它已填充,则它已在某个时间点同步。

对象的实际同步由AD中的objectGUID属性和Azure AD中的immutableID属性确定。如果这些匹配,则同步对象。下面是一篇文章,其中详细介绍了如何在必要时修改immutableID属性,以便将Azure AD条目与其AD对应项同步:

http://mstechtalk.com/understand-and-modify-office365-users-immutableid/


0
投票

要查找仅限云的用户和组:

用户:

Get-AzureADUser -all $true | ? {$_.OnPremisesSecurityIdentifier -eq $null}

团体:

Get-AzureADGroup -all $true | ? {$_.OnPremisesSecurityIdentifier -eq $null -and $_.SecurityEnabled -eq $true }
© www.soinside.com 2019 - 2024. All rights reserved.