Microsoft Entra ID

Filename: VerifyAzureUsers.ps1

In brief

> [!IMPORTANT]

What Entra admins need to know

Review the documentation change to determine whether it affects tenant configuration, security posture, or rollout plans.

This editorial summary was generated by AI from the documentation changes. Verify important details in the full Microsoft Learn article.

Documentation change

Open on Microsoft Learn ↗

The comparison below is an extract of the Microsoft Learn article showing only the changed content. Open the full article for complete context.

Steps for migrating from Microsoft Entra Connect to cloud sync

|Step|Description| |Verify the pre-requisites for migrating|The following guidance is only for users who have installed Microsoft Entra Connect using the Express settings and aren't synchronizing devices. Also you should verify the cloud sync pre-requisites

The supported coexistence model is to keep objects in Microsoft Entra Connect Sync scope and use the cloudNoFlow and JoinNoFlow rules to prevent Microsoft Entra Connect Sync from exporting object adds, object deletes, and non-reference attribute updates. Reference attribute updates, such as member and manager, can still flow for reference resolution.

You can still migrate in phases, such as by OU or another defined batch. Each batch must remain in Microsoft Entra Connect Sync scope with the no-flow rules applied until that batch is fully migrated and ready for cutover.

|Step|Description| |Verify the pre-requisites for migrating|The following guidance is only for users who have installed Microsoft Entra Connect using the Express settings and aren't synchronizing devices. Also you should verify the cloud sync pre-requisites.| |Back up your Microsoft Entra Connect configuration|Before making any changes, you should back up your Microsoft Entra Connect configuration. This way, you can rollback. For more information, see Import and export Microsoft Entra Connect configuration settings.| |Review the migration tutorial|To become familiar with the migration process, review the Migrate to Microsoft Entra Cloud Sync for an existing synced AD forest tutorial. This tutorial guides you through the migration process in a sandbox environment.| |Create or identify an OU for the migration|Create a new OU or identify an existing OU that contains the users you'll test migration on. Keep this OU in Microsoft Entra Connect Sync scope during migration.| |Move users into new OU (optional)|If you're using a new OU, move the users that are in scope for this pilot into that OU now. Before continuing, let Microsoft Entra Connect Sync pick up the changes so that it's synchronizing them in the new OU. Don't remove the OU or users from Microsoft Entra Connect Sync scope during migration.| |Run PowerShell on OU|You can run the following PowerShell cmdlet to get the counts of the users that are in the pilot OU.
Get-ADUser -Filter * -SearchBase "<DN path of OU>"
Example: Get-ADUser -Filter * -SearchBase "OU=Finance,OU=UserAccounts,DC=FABRIKAM,DC=COM"| |Stop the scheduler|Before creating new sync rules, you need to stop the Microsoft Entra Connect scheduler. For more information, see how to stop the scheduler. |Create the custom sync rules|In the Microsoft Entra Connect Synchronization Rules editor, you need to create an inbound sync rule that filters outsets the cloudNoFlow attribute to True for users in the OU you created or identified previously. The inbound sync rule is a join rule with a target attribute of cloudNoFlow. You'll also need an outbound sync rule with a link type of JoinNoFlow and thea scoping filter that has the cloudNoFlow attribute set to True.True. Together, these rules prevent Microsoft Entra Connect Sync from exporting object adds, object deletes, and non-reference attribute updates for the scoped users. Reference attribute updates, such as member and manager, can still flow for reference resolution. During the pilot or coexistence phase, don't remove the pilot OU, group, domain, or related referenced objects from Microsoft Entra Connect Sync scope. For more information, see the Migrate to Microsoft Entra Cloud Sync for an existing synced AD forest tutorial for how to create these rules.| |Install the provisioning agent|If you haven't done so, install the provisioning agent. For more information, see how to install the agent.| |Configure cloud sync|Once the agent is installed, you need to configure cloud sync. In the configuration, you need to create a scope to the OU that was created or identified previously. For more information, see Configuring cloud sync.| |Verify pilot users are synchronizing and being provisioned|Verify that the users are now being synchronized in the portal. You can use the PowerShell script below to get a count of the number of users that have the on-premises pilot OU in their distinguished name. This number should match the count of users in the previous step. If you create a new user in this OU, verify that it's being provisioned.| |Start the scheduler|Now that you've verified users are provisioning and synchronizing, you can go ahead and start the Microsoft Entra Connect scheduler. For more information, see how to start the scheduler. |Schedule youyour remaining users|Now you should come up with a plan on migrating more users. You should useCreate a phased approach so that youmigration plan for the remaining users, groups, contacts, and related referenced objects. You can verify thatmigrate in batches, such as by OU, but keep each batch in Microsoft Entra Connect Sync scope with the migrations are successful.no-flow rules applied until the batch is fully migrated and ready for cutover.| |Verify all users are provisioned|As you migrate users, verify that they're provisioning and synchronizing correctly.| |Stop Microsoft Entra Connect|OnceAfter you've verified that all of your usersobjects in the migration scope are migrated,provisioned by Microsoft Entra Cloud Sync and their references, such as group memberships and manager relationships, remain intact, you can turn off thestop Microsoft Entra Connect synchronization service.Sync for that scope as part of final cutover. Microsoft recommends that you leave the server isin a disabled state for a period of time,time so you can verify that the migration was successfulsuccessful.| |Verify everything is good|After a period of time, verify that everything is good.| |Decommission the Microsoft Entra Connect server|Once you've verified everything is good, take the Microsoft Entra Connect server offline. For more information, see Uninstall Microsoft Entra Connect.|

Verify Users script

# Filename:  VerifyAzureUsers.ps1