码迷,mamicode.com
首页 > 其他好文 > 详细

Office365 Active Directory同步配置筛选

时间:2015-02-28 16:44:48      阅读:395      评论:0      收藏:0      [点我收藏+]

标签:office365 active directory同步配置筛选

Office365 Active Directory同步配置筛选

我们上一篇介绍了Office365联合身份验证服务的配置,实现本地的Active Directory和Office365实现联合认证,完成SSO-单点登陆。其中有一个过程是需要通过dirsync工具将本地的Active Directory 信息同步到Office365上,同步后,我们发现默认是将本地所有的用户组信息同步到Office365,这样的同步结果对于管理员来说是很不方便的,为什么呢,因为如果本地有上千甚至过万的用户,这些用户信息都同步到Office365上的话维护起来不方便,那怎么实现将指定的本地Active Directory信息同步到Office365下呢,答案是当然,就是配置Office365目录同步筛选,我们通过配置筛选将指定的用户、OU或者Domain信息同步到Office365下,同步的默认配置,随后又配置了筛选,则筛选掉的对象将不再同步到云。因此,目录同步过程将会删除云中前面已同步但随后从同步中筛选掉的所有对象。如果由于筛选出错而无意中删除了对象,你可以在云中重新创建这些对象,方法是删除筛选配置,然后重新同步目录。还有就是默认同步时长为3小时。如果需要立即生效的话,我们需要通过windows powershell进行强制目录同步操作,具体见下:http://technet.microsoft.com/zh-cn/library/jj710171.aspx

我们打开office365的管理portal页面,因为我们域内只有两个用户,所以就他同步了两个, 如果域内有多个用户的话,都会同步过去

技术分享

我们为了测试,我们仅仅同步域内下OU为Iternal_Admins的用户,该OU下只有gavin一个用户

技术分享

然后Iternal_Users下有一个bob用户

技术分享

首选我们进入Dirsync安装目录

Open Identity Manager by double-clicking miisclient.exe that is located in the following folder:

%ProgramFiles%\Microsoft Azure Active Directory Sync\SYNCBUS\Synchronization Service\UIShell

技术分享

技术分享

In Identity Manager, click Management Agents, and then double-click Active Directory Connector.

技术分享

技术分享

Click Configure Directory Partitions, and then click Containers

技术分享


Note:When presented with the credentials dialog box, the MSOL_AD_Sync account will be displayed. This account is using a randomly generated password, so administrators will not know the password. When performing this filtering operation, you should enter an account which has access to the Active Directory forest. The account used here should be an Enterprise Admin. The Enterprise Admin account can view the entire forest and perform the filtering within any domain within the forest. Using a Domain Admin will limit the scope of what the Directory Synchronization tool can view and may not be viable when needing to expand the filter into other domains.

所以我们再次输入域管理员账户及密码验证

技术分享


我们在此输入iternalsoft.com的域管理员;注:该用户其实就是安装dirsync所输入的验证管理员;

技术分享

默认是全部同步

技术分享

In the Select Containers dialog box, clear the OUs that you don’t want to synch with the cloud directory, and then click OK. Click OK on the SourceAD Propertiespage

技术分享

Click ok

技术分享

Perform a full sync: on the Management Agent tab, right-click Active Directory Connector, click Run, click Full Import Full Sync, and then click OK.

技术分享

技术分享

开始 syncing

技术分享

同步完成

技术分享

2.基于域:

可以在目录同步工具中使用此筛选类型来管理 SourceAD 管理代理的属性。此类型可让你选择要允许哪些域同步到云

1.Log on to the computer that is running directory synchronization by using an account that is a member of the MIISAdmins local security group.

2.Open Identity Manager by double-clicking miisclient.exe that is located in the following folder:

%ProgramFiles%\Windows Azure Active Directory Sync\SYNCBUS\Synchronization Service\UIShell

3.In Identity Manager, click Management Agents, and then double-click Active Directory Connector.

技术分享

Click Configure Directory Partitions, and then select the domains that you want to synchronize. To filter a domain out of the synchronization process, clear the domain’s check box.

技术分享

If you have removed a domain from the scope of the Active Directory Connector, you need to update its run profiles:

1).Right-click the Active Directory Connector, and then select Configure Run Profiles.

2).From Full Import run profile step details, select the step for the domain you just unselected, and then click Delete Step.

3).Click OK.

4).Perform a full sync: on the Management Agent tab, right-click Active Directory Connector, clickRun, click Full Import Full Sync, and then click OK.

3.基于用户特性:

可以使用此筛选方法针对用户对象指定基于特性的筛选器。这样,你便可以控制哪些对象不应同步到云;基于用户特性的筛选过程可能只适用于用户对象。联系人和组使用了超出本文范畴的复杂筛选规则。  
若要筛选掉特定的用户,需要更新本地组织中你不想要同步到云的用户对象。可以基于任何用户对象特性进行筛选。    
例如,可以针对本地组织中你不想要同步到云的每个用户,将字符串“NoSync”添加到 extensionAttribute15 用户特性。在此示例中,配置本地用户后,你将要在标识管理器中创建一个筛选规则,从同步过程中排除“NoSync”用户。    
以下过程描述了如何在 extensionAttrtibute15 中使用“NoSync”字符串配置用户筛选。

步骤 1:配置本地用户对象

1.在“Active Directory 用户和计算机”中的“视图”菜单内,选择“高级功能”,然后打开用户的属性页。

2.在“属性编辑器”选项卡上,将 extensionAttribute15 设置为 NoSync。

步骤 2:在 Active Directory 连接器上配置筛选

1.使用属于 MIISAdmins 本地安全组的帐户登录到运行目录同步的计算机。

2.通过双击位于以下文件夹中的 miisclient.exe 打开标识管理器:

%ProgramFiles%\Microsoft Azure Active Directory Sync\SYNCBUS\Synchronization Service\UIShell

3.在标识管理器中,单击“管理代理”,然后双击“Active Directory 连接器”。

4.单击“配置连接器筛选器”,然后执行以下操作:

5.在“数据源对象类型”网格中选择“用户”,然后单击“新建”。

6.在“用户筛选器”中,对于“数据源”特性,请选择 extensionAttribute15;对于“运算符”,7.请选择“等于”,然后在“值”字段中键入 NoSync。

8.单击“添加条件”,然后单击“确定”。

9.在“SourceAD 属性”页上,单击“确定”。

10执行完全同步:在“管理代理”选项卡上,右键单击“Active Directory 连接器”,然后依次单击“运行”、“完全导入完全同步”和“确定”。

4.同步时间

我们最后通过log确认,dirsync默认的同步时间为3小时一次。

如果我们在修改后的某个属性的话,需要理解生效的话,我们可以通过powershell进行强制同步。

5.使用windows powershell强制执行目录同步

技术分享

技术分享

我们需要在运行同步目录工具的计算机上,启动powshell,输入import-module dirsync 然后回车确认。

然后我们通过start-onlinecoexistencesync来进行强制同步

我们最后再强调一个问题,在配置目录同步时,系统会在本地的Active Directorty林中创建一个同步用户组,用该服务器账户读取和同步你本地的Active directory信息。

在为给订的云租户组织配置并同步该工具后,你无法配置同一目录同步安装来填充其他云租户

技术分享

本文出自 “高文龙” 博客,谢绝转载!

Office365 Active Directory同步配置筛选

标签:office365 active directory同步配置筛选

原文地址:http://gaowenlong.blog.51cto.com/451336/1615912

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!