<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Merényi Mónika</title>
    <description>The latest articles on DEV Community by Merényi Mónika (@neontiger12).</description>
    <link>https://dev.to/neontiger12</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2706498%2Ff0a7f23b-f80f-44af-9fb1-d9772d1871d5.jpeg</url>
      <title>DEV Community: Merényi Mónika</title>
      <link>https://dev.to/neontiger12</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/neontiger12"/>
    <language>en</language>
    <item>
      <title>Understanding Entra Connect Sync Architecture: A Deep Dive - Part 3</title>
      <dc:creator>Merényi Mónika</dc:creator>
      <pubDate>Sun, 16 Feb 2025 19:13:09 +0000</pubDate>
      <link>https://dev.to/neontiger12/understanding-entra-connect-sync-architecture-a-deep-dive-part-3-oc2</link>
      <guid>https://dev.to/neontiger12/understanding-entra-connect-sync-architecture-a-deep-dive-part-3-oc2</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Continuing our journey to better understand Entra Connect Sync let's see everything in action!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Start your DC1 server&lt;/strong&gt; created in &lt;a href="https://dev.to/neontiger12/deploying-and-configuring-a-hybrid-identity-lab-using-bicep-part-1-active-directory-setup-and-2eo7"&gt;this post&lt;/a&gt; , login.&lt;/p&gt;

&lt;p&gt;Make sure that the Microsoft Azure AD Sync service is running:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnpfdtihmkvmttxpukeym.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnpfdtihmkvmttxpukeym.png" alt="Service Running" width="800" height="397"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Start the Syncrhonization Service&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj2ym4bwsyp820oftwkqa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj2ym4bwsyp820oftwkqa.png" alt="Sync service" width="640" height="1130"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Check what steps are included in the Delta Sync&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To make it clean and easy to follow, let's clear the previous Operations if you have one:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F823ba8yfd6w9brdqc5uo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F823ba8yfd6w9brdqc5uo.png" alt="Clear" width="520" height="330"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now you can manually start a Delta Sync with PowerShell:&lt;/p&gt;

&lt;p&gt;_Import-Module ADSync&lt;br&gt;
Start-ADSyncSyncCycle -PolicyType Delta _&lt;/p&gt;

&lt;p&gt;Delta Sync only syncronizes the changed data, while the Initial Sync syncronizes all data from the connected data sources.&lt;/p&gt;

&lt;p&gt;In the Operation Tab you can see the steps involved in the Delta Syc:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvyg3191sgk3udf8stkjq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvyg3191sgk3udf8stkjq.png" alt="Delta" width="800" height="183"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Delta Import from the local Active Directory - CD to CS &lt;/li&gt;
&lt;li&gt;Delta Import from Entra ID (shown as AAD) - CD to CS&lt;/li&gt;
&lt;li&gt;Delta Synchronization from Entra ID (shown as AAD) - CS to MV&lt;/li&gt;
&lt;li&gt;Delta Synchronization from Active Directory - CS to MW&lt;/li&gt;
&lt;li&gt;Export to Entra ID (shown as AAD) - MW to CS&lt;/li&gt;
&lt;li&gt;Export to Active Directory - MW to CS&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;! Disable the sync scheduler now to make sure it won't automatically start a Delta Sync after you create a new user:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Set-ADSyncScheduler -SyncCycleEnabled $false&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create a new user in AD&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Active Directory Users and Computers&lt;/p&gt;

&lt;p&gt;Users » right click » New » User&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhxsj2w7uui5693cgbu0b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhxsj2w7uui5693cgbu0b.png" alt="Users" width="800" height="520"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Name him:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fin7r8lrv0442nuzjbyx2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fin7r8lrv0442nuzjbyx2.png" alt="Name" width="800" height="685"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7g39ezev231cebafgh9p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7g39ezev231cebafgh9p.png" alt="finish" width="800" height="687"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Check if the object exists in the Connector Space&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Connector Space tab » Right click on your CS connected to Active Directory » Search&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1v2tpp1b7gesgg2eq6ai.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1v2tpp1b7gesgg2eq6ai.png" alt="Search" width="800" height="677"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click Search and order the list by the Object type&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0gdodf27z12bvbgbatwt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0gdodf27z12bvbgbatwt.png" alt="Object" width="800" height="581"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;No "New User" object here.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Start a Delta Import&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To start a Delta Import right click on the Connector Space connected to the AD » Run » Delta Import&lt;/p&gt;

&lt;p&gt;Check the Synchronization Statistics: 1 added item, our new user is replicated to the Connector Space.&lt;/p&gt;

&lt;p&gt;This process of bringing in a new object from a connected data source into the Connector Space is called &lt;strong&gt;provisioning&lt;/strong&gt; (from the perspective of the Connector Space)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fba5slrz3s9tc2mdtvvqg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fba5slrz3s9tc2mdtvvqg.png" alt="Added new user" width="800" height="483"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you search again in the Connector Space you will find the replica of the New User there.&lt;/p&gt;

&lt;p&gt;Check the object in the Metaverse. Since it hasn't been synchronized to the Metaverse yet, it should not be visible.&lt;/p&gt;

&lt;p&gt;Metaverse Search Tab » Search&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwlz7xpm7fvwmyy6m9dik.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwlz7xpm7fvwmyy6m9dik.png" alt="Search" width="800" height="408"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Our new user is not here.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Run a Delta Import from Entra ID (shows as AAD).&lt;/strong&gt; &lt;br&gt;
No updates from Entra ID.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Now let's run a Delta Synchronization on the local AD Connector Space&lt;/strong&gt; to project our new user object to the Metaverse.&lt;/p&gt;

&lt;p&gt;Right click on the Connector Space connected to the local AD » Run » Delta Syncrhonization&lt;/p&gt;

&lt;p&gt;You can see the Synchronization Statistics: there is one new projection.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9xowa2ajjytp5ajlrhxl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9xowa2ajjytp5ajlrhxl.png" alt="Projection" width="800" height="527"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;During the Inbound Synchronization step, if the object does not yet exist in the metaverse, it is &lt;strong&gt;projected&lt;/strong&gt; into the metaverse.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Projection&lt;/strong&gt; refers to the creation of a new object in the metaverse &lt;strong&gt;when there is no existing matching object&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;If you search the Metaverse now you will find our new object.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F964wc7yea1ysl4691vus.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F964wc7yea1ysl4691vus.png" alt="metaverse search" width="800" height="416"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do the Delta Syncronization on the Connector Space connected to the Entra ID (AAD).&lt;/strong&gt;&lt;br&gt;
There will be no changes comming from Entra ID.&lt;/p&gt;

&lt;p&gt;Now check the object in the Connector Space connected to Entra ID (AAD). Search the Connector Space and organize the result by the Object Type.&lt;/p&gt;

&lt;p&gt;By clicking the Properties of the new user (with the Display name blank) you can see it is flagged as "&lt;strong&gt;Pending Export&lt;/strong&gt;".&lt;/p&gt;

&lt;p&gt;**Now let's do an Export on the Connector Space connected to Entra ID (AAD) **to export the newly created object to the cloud.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl5n8fqb6qx4d6jecaoro.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl5n8fqb6qx4d6jecaoro.png" alt="Import export" width="800" height="166"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://learn.microsoft.com/en-us/entra/identity/hybrid/connect/media/concept-azure-ad-connect-sync-architecture/arch6.png" rel="noopener noreferrer"&gt;Source&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Right click on the Connector Space connected to the AAD » Run » Export&lt;/p&gt;

&lt;p&gt;After in finish successfully you can see there is 1 added item.&lt;/p&gt;

&lt;p&gt;Check if you can find the new object in the Connector Space connected to Entra ID (AAD). &lt;/p&gt;

&lt;p&gt;Search Connector Space:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb2qqkf737lczvqxjiil7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb2qqkf737lczvqxjiil7.png" alt="Empty" width="800" height="484"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can see there is a new item with the Display name field blank.&lt;br&gt;
(if you don't see the Display Name column click on &lt;strong&gt;Column Settings...&lt;/strong&gt; and add it)&lt;/p&gt;

&lt;p&gt;We are waiting for confirmation from Entra ID that the export was successful. Since this hasn't happened yet, the status shows "Awaiting Export Confirmation."&lt;/p&gt;

&lt;p&gt;Check the properties of the object:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F69vtrohruydy9mhkt1b6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F69vtrohruydy9mhkt1b6.png" alt="Export confirmation" width="800" height="621"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you check your users in Entra ID you can already see the newly added user:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuj5rhv0j5upaaep46yb5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuj5rhv0j5upaaep46yb5.png" alt="Added" width="800" height="469"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Let's get the confirmation from Entra ID (AAD)&lt;/strong&gt;&lt;br&gt;
Run a Full Import on the Connector Space connected to Entra ID (AAD)&lt;/p&gt;

&lt;p&gt;Check the new user again, now the object will show it's display name:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxvmkguqvbb2d4p18c9r2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxvmkguqvbb2d4p18c9r2.png" alt="Import" width="800" height="540"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Even if you do a Delta Sync with PowerShell you still see the new object as Awaiting Export Confirmation after the Delta Sync successfully finished.&lt;/p&gt;

&lt;p&gt;To try this create a new user like "Delta New User" and run a Delta Sync manually ( &lt;em&gt;Start-ADSyncSyncCycle -PolicyType Delta&lt;/em&gt; ).&lt;br&gt;
Check the object in the Connector Space connected to the Entra ID (AAD). It shows as Awaiting Export Confirmation.&lt;/p&gt;

&lt;p&gt;The "Awaiting Export Confirmation" status means that the Sync Engine has successfully exported the new user object to Entra ID but has not yet received confirmation that Entra ID processed the change.&lt;/p&gt;

&lt;p&gt;The Sync process (exporting the change from AD to Entra ID) is &lt;strong&gt;asynchronous&lt;/strong&gt;, meaning changes are sent to Entra ID, but the system waits for confirmation that they have been processed. Once Entra ID acknowledges the export, the status will update, and the object will be fully synchronized. &lt;br&gt;
Until then, the object remains in this state, indicating the process is not yet complete. &lt;br&gt;
Confirmation will occur during the next Sync Cycle or can be triggered manually by initiating an Import (full or delta) from Entra ID, as demonstrated in the example.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Understanding Entra Connect Sync Architecture: A Deep Dive - Part 2</title>
      <dc:creator>Merényi Mónika</dc:creator>
      <pubDate>Sat, 15 Feb 2025 17:47:23 +0000</pubDate>
      <link>https://dev.to/neontiger12/understanding-entra-connect-sync-architecture-a-deep-dive-part-2-3ool</link>
      <guid>https://dev.to/neontiger12/understanding-entra-connect-sync-architecture-a-deep-dive-part-2-3ool</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In Part 1, we explored the core components of Microsoft Entra Connect Sync—Connectors, the Connector Space, and the Metaverse—which form the foundation of identity synchronization. But how does data actually move through the system? How does Entra Connect Sync ensure changes in your on-premises Active Directory (AD) are reflected in Microsoft Entra ID?&lt;/p&gt;

&lt;p&gt;In Part 2, we’ll dive deep into the synchronization process, exploring how sync objects interact and move identity data through the system.&lt;/p&gt;

&lt;p&gt;Let's begin!&lt;/p&gt;

&lt;p&gt;We already discussed Sync Engine in the previous post, but here is a recap:&lt;/p&gt;

&lt;h2&gt;
  
  
  Sync Engine
&lt;/h2&gt;

&lt;p&gt;The Sync Engine is a system that synchronizes identity data across different sources, such as a company’s HR database, Active Directory, and cloud services. It acts as a middleman, ensuring that changes made in one system—like adding a new employee to HR records—are reflected in other connected systems.&lt;/p&gt;

&lt;p&gt;And let's dig deeper:&lt;/p&gt;

&lt;p&gt;To manage this synchronization, the Sync Engine uses &lt;strong&gt;objects&lt;/strong&gt;, which are digital representations of users, devices, or groups from various sources.&lt;/p&gt;

&lt;p&gt;Every object in the sync engine must have a &lt;strong&gt;globally unique identifier (GUID)&lt;/strong&gt;, to make sure there are no duplicates and to track relationships between objects.&lt;/p&gt;

&lt;h3&gt;
  
  
  Types of Objects in the Sync Engine
&lt;/h3&gt;

&lt;p&gt;For recap: &lt;strong&gt;Connector Space&lt;/strong&gt; is where identity data from external systems (like Active Directory, HR databases, or cloud services) is temporarily stored before being processed and synchronized with the metaverse. &lt;/p&gt;




&lt;h3&gt;
  
  
  Objects in the Connector Space include:
&lt;/h3&gt;

&lt;h4&gt;
  
  
  1. Staging Object
&lt;/h4&gt;

&lt;p&gt;This is the most important type.&lt;/p&gt;

&lt;p&gt;A staging object is a temporary copy of an object from a connected data source, stored in the connector space before synchronization.&lt;/p&gt;

&lt;p&gt;It stores key attributes and operational data needed for synchronization.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Characteristics of Staging Objects&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Each staging object has a &lt;strong&gt;GUID (globally unique identifier)&lt;/strong&gt; and a &lt;strong&gt;distinguished name&lt;/strong&gt; for identification.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It always includes an object type to define its nature (e.g., user, group, device).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Staging objects from an imported data source always have an anchor attribute (a unique key that remains constant for an object).&lt;br&gt;
NOTE: Newly provisioned objects (created by the sync engine) do not yet have an anchor attribute until they exist in the connected data &lt;br&gt;
source.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Check one user for example in Synchronization Service Manager:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd86yi58a2t39gokfueln.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd86yi58a2t39gokfueln.png" alt="Sync service" width="800" height="622"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Synchronization Service Manager » Connectors » your local AD connector - Right click » Search Connector Space &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8z9bylf7ywywefmbn9qx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8z9bylf7ywywefmbn9qx.png" alt="Search Connector Space" width="800" height="554"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Role of Staging Objects in Sync&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;They &lt;strong&gt;store identity attributes&lt;/strong&gt;(such as name, email, group memberships).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;They track operational status for synchronization&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The sync engine does not apply changes immediately. Instead, it stages changes in the connector space before they are processed. &lt;/p&gt;

&lt;p&gt;This is where the "pending import" and "pending export" flags come in.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pending Import&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The sync engine has received new or updated data from a connected data source, but it has not yet processed that data.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;A user in your on-premises Active Directory (AD) changes their name.&lt;/p&gt;

&lt;p&gt;The user object in the connector space is updated with the new name address, but it has not yet been written to the metaverse.&lt;/p&gt;

&lt;p&gt;Until the sync engine applies this change, the object is flagged as "pending import."&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frejgyrzseuy6u179vr9i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frejgyrzseuy6u179vr9i.png" alt="Import" width="800" height="365"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://learn.microsoft.com/en-us/entra/identity/hybrid/connect/media/concept-azure-ad-connect-sync-architecture/arch3.png" rel="noopener noreferrer"&gt;Source of the picture&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pending Export&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The sync engine has processed a change and is ready to send it to a connected system, but it has not yet been applied.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;The sync engine determines that a new employee needs to be provisioned in Microsoft Entra ID (Azure AD).&lt;br&gt;
It creates an export object in the connector space to send this new identity to Entra ID.&lt;br&gt;
However, until the sync engine successfully exports the object, it is flagged as "pending export."&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F88mlm2akk7mbayo2etyg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F88mlm2akk7mbayo2etyg.png" alt="Export" width="800" height="359"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://learn.microsoft.com/en-us/entra/identity/hybrid/connect/media/concept-azure-ad-connect-sync-architecture/arch4.png" rel="noopener noreferrer"&gt;Source of the picture&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Import Object&lt;/strong&gt; → Created when sync engine detects an object in a connected data source and stages it in the connector space.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Export Object&lt;/strong&gt; → Created when an update needs to be sent from the sync engine to a connected data source.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why is this important?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;These flags help the sync engine track unprocessed changes, ensuring that:&lt;br&gt;
✅ Only necessary updates are applied.&lt;br&gt;
✅ No redundant or conflicting changes occur.&lt;br&gt;
✅ Data remains consistent across connected systems.&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Placeholder
&lt;/h4&gt;

&lt;p&gt;Placeholders are temporary objects in the Sync Engine used to &lt;strong&gt;preserve the structure of hierarchical systems&lt;/strong&gt; like Active Directory. For example, if a user is imported but their manager’s record isn’t available yet, a placeholder is created to represent the missing manager. Once the manager’s record is imported, the placeholder is replaced by the actual object.&lt;/p&gt;

&lt;h4&gt;
  
  
  3. Disjoined Objects (Disconnector Objects)
&lt;/h4&gt;

&lt;p&gt;These are staging objects in the Connector Space that are not linked to any object in the metaverse.&lt;br&gt;
They exist in the Sync Engine but don’t yet affect synchronization.&lt;/p&gt;

&lt;p&gt;An object becomes disjoined if, for example, it fails to meet synchronization criteria.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb2jgubi45eh7pdnooizz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb2jgubi45eh7pdnooizz.png" alt="joined disjoined" width="800" height="261"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://learn.microsoft.com/en-us/entra/identity/hybrid/connect/media/concept-azure-ad-connect-sync-architecture/arch5.png" rel="noopener noreferrer"&gt;Source&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Object in the metaverse:
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Metaverse object:
&lt;/h4&gt;

&lt;p&gt;A metaverse object represents a consolidated view of identity data aggregated from one or more connector space objects (imported from connected data sources).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Automatic Creation &amp;amp; Deletion:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Metaverse objects cannot be manually created or deleted.&lt;br&gt;
They are automatically generated when a connector space object is linked to the metaverse.&lt;br&gt;
If all linked connector space objects are deleted or disconnected, the sync engine automatically removes the corresponding metaverse object.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Attribute Flow &amp;amp; Synchronization:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The metaverse object maintains the most up-to-date identity information through attribute flow, where changes from the connector space are synchronized into the metaverse.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One-to-Many Relationship:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A metaverse object can be linked to multiple connector space objects (from different connected data sources).&lt;br&gt;
However, a connector space object can be linked to only one metaverse object.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgh7yiavft63b9sukb65i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgh7yiavft63b9sukb65i.png" alt="one to many" width="800" height="327"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Joined objects&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When a staging object in the Connector Space is linked to a metaverse object, it becomes a &lt;strong&gt;joined object&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This allows data to flow between the metaverse and the external system.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2bsh1vqt2jrfgh393v2x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2bsh1vqt2jrfgh393v2x.png" alt="join" width="800" height="264"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://learn.microsoft.com/en-us/entra/identity/hybrid/connect/media/concept-azure-ad-connect-sync-architecture/arch5.png" rel="noopener noreferrer"&gt;Source&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Summary
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Objects in the Connector Space&lt;/strong&gt; → Staging Objects, Placeholders, Disjoined Objects.&lt;br&gt;
&lt;strong&gt;Objects in the Metaverse&lt;/strong&gt; → Unified identity objects.&lt;br&gt;
&lt;strong&gt;Objects linked between both&lt;/strong&gt; → Joined Objects (Connector Objects).&lt;/p&gt;

&lt;p&gt;A little illustration that I created shows everything we discussed so far. &lt;/p&gt;

&lt;p&gt;Objects from a connected data source are temporarily stored in the Connector Space as &lt;strong&gt;staging objects&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Import objects&lt;/strong&gt; exist in the Connector Space for the on-premises Active Directory (AD).&lt;br&gt;
&lt;strong&gt;Export objects&lt;/strong&gt; exist in the Connector Space for Microsoft Entra ID.&lt;br&gt;
The synchronization process follows these steps:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Inbound Synchronization:&lt;/strong&gt; The object is first synchronized from the Connector Space to the metaverse, governed by inbound synchronization rules (ISR).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Outbound Synchronization:&lt;/strong&gt; The object is then synchronized from the metaverse to the target Connector Space as an export object, following outbound synchronization rules (OSR).&lt;/p&gt;

&lt;p&gt;This ensures that identity data flows correctly between systems while maintaining consistency across environments.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk594a5mrhkzwq8sgv0pc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk594a5mrhkzwq8sgv0pc.png" alt="Summary" width="800" height="346"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the next part we will se everything in action.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Understanding Entra Connect Sync Architecture: A Deep Dive - Part 1</title>
      <dc:creator>Merényi Mónika</dc:creator>
      <pubDate>Fri, 14 Feb 2025 17:45:59 +0000</pubDate>
      <link>https://dev.to/neontiger12/understanding-entra-connect-sync-architecture-a-deep-dive-part-1-3k3p</link>
      <guid>https://dev.to/neontiger12/understanding-entra-connect-sync-architecture-a-deep-dive-part-1-3k3p</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In today's cloud-driven world, identity synchronization is the backbone of seamless user access across hybrid environments. Microsoft Entra Connect Sync plays a crucial role in ensuring that on-premises directories and Microsoft Entra ID remain in sync.&lt;/p&gt;

&lt;p&gt;But how does it really work under the hood? What components make up this synchronization engine? And how do sync rules define the flow of identities?&lt;/p&gt;

&lt;p&gt;In this deep-dive series, we'll unravel Entra Connect Sync Architecture, breaking down:&lt;br&gt;
✅ Core components of Entra Connect Sync&lt;br&gt;
✅ Data flow and processing in synchronization&lt;br&gt;
✅ Connectors, metaverse, and rules engine&lt;br&gt;
✅ How synchronization rules shape identity lifecycle management&lt;/p&gt;

&lt;p&gt;This first post focuses on understanding the architecture before we explore the intricacies of sync rules in future articles.&lt;/p&gt;

&lt;p&gt;In my &lt;a href="https://dev.to/neontiger12/deploying-and-configuring-a-hybrid-identity-lab-using-bicep-part-1-active-directory-setup-and-2eo7"&gt;first post&lt;/a&gt; I quickly run over the basic architecture of Entra Connect, and we used it in real life, but I haven't really explained how it works in details.&lt;/p&gt;

&lt;p&gt;I believe it will be valuable for many to explore the design and grasp the fundamental concepts.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Entra Connect Sync?
&lt;/h2&gt;

&lt;p&gt;Entra Connect Sync bridges your on-premises Active Directory with Microsoft Entra ID by synchronizing user identities to the cloud. The data flow is fully customizable using sync rules, allowing you to control how information is synced. This ensures seamless authentication across your hybrid environment.&lt;/p&gt;

&lt;p&gt;This topic explains how key features of the Microsoft Entra Connect Sync service work.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sync Engine Overview
&lt;/h2&gt;

&lt;p&gt;The sync engine gathers and manages identity data from multiple sources, such as &lt;strong&gt;Active Directory&lt;/strong&gt; or &lt;strong&gt;SQL Server&lt;/strong&gt;, creating a unified view of identities. &lt;br&gt;
Any system that structures data in a database-like format and supports standard data-access methods can be a data source. These synchronized data sources are known as &lt;strong&gt;connected directories (CD)&lt;/strong&gt; or &lt;strong&gt;connected data sources&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Connectors
&lt;/h3&gt;

&lt;p&gt;The sync engine interacts with connected data sources through modules called &lt;strong&gt;Connectors&lt;/strong&gt;. Each data source has a specific Connector that translates operations into a format the source understands.&lt;/p&gt;

&lt;p&gt;Connectors use API calls to read and write identity data between the sync engine and the data source. &lt;br&gt;
Custom Connectors can also be created using the extensible connectivity framework for additional integration options.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdthan1ov2i2elp7m7awi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdthan1ov2i2elp7m7awi.png" alt="Connector" width="800" height="373"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Connectors are installed on the machine that is running Entra Connect Sync. &lt;br&gt;
They enable communication without requiring specialized agents by using &lt;strong&gt;remote system protocols&lt;/strong&gt;. This approach reduces both deployment time and risk, particularly when integrating with critical applications and systems.&lt;/p&gt;

&lt;p&gt;The connector handles all import and export operations, freeing developers from having to understand the native connection methods of each system.&lt;/p&gt;

&lt;p&gt;Imports and exports are scheduled, meaning changes in the system do not automatically sync to the connected data source. Additionally, developers can create custom connectors to integrate with virtually any data source.&lt;/p&gt;

&lt;p&gt;The default synchronization schedule for Microsoft Entra Connect Sync is set to run every 30 minutes. This means that the sync engine checks for updates and performs imports or exports at 30-minute intervals.&lt;/p&gt;

&lt;p&gt;We will talk about imports and exports a little bit later.&lt;/p&gt;

&lt;h3&gt;
  
  
  Connector Space
&lt;/h3&gt;

&lt;p&gt;Each connected date source is represented as a filtered subset of objects and attributes in its own Connector Space. The identity data is temporarily stored, and this design allows the sync engine to operate locally, reducing the need to interact with the remote system during the sycn process. It ensures that the data is properly mapped and syncronized before it is moved to its final destination.&lt;/p&gt;

&lt;p&gt;The sync engine uses the connector space to determine what has changed in the connected data source and to stage incoming changes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fidhuawvx4ghg2wl5baag.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fidhuawvx4ghg2wl5baag.png" alt="Connector Space" width="800" height="292"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Metaverse
&lt;/h3&gt;

&lt;p&gt;The metaverse is a central repository that consolidates identity data, acting as a unified view of identities from one or more connected data sources. &lt;br&gt;
It stores and organizes identity objects and their attributes, ensuring they are mapped correctly and synchronized across systems. &lt;/p&gt;

&lt;p&gt;The metaverse manages &lt;strong&gt;attribute flow&lt;/strong&gt;, which is the process of transferring and transforming data based on predefined &lt;strong&gt;attribute mappings&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;Attribute flow between the connector space and the metaverse is governed by synchronization rules, which define one-way data movement per rule. However, multiple rules can run in the same sync cycle, allowing bidirectional updates in different stages of synchronization.&lt;/p&gt;

&lt;p&gt;Even with a single data source, the metaverse plays a key role in ensuring data is structured properly and updated efficiently without re-evaluating connections every time.&lt;/p&gt;

&lt;p&gt;Here you can see how multiple data sources would use the metaverse:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmun9wqlzpsb3h19eka1y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmun9wqlzpsb3h19eka1y.png" alt="multiple data" width="800" height="338"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Sync Engine Identity Management Process
&lt;/h2&gt;

&lt;p&gt;The sync engine ensures identity updates between connected data sources through three main processes: &lt;strong&gt;Import&lt;/strong&gt;, &lt;strong&gt;Synchronization&lt;/strong&gt;, and &lt;strong&gt;Export&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Import
&lt;/h3&gt;

&lt;p&gt;The sync engine &lt;strong&gt;retrieves the identity data&lt;/strong&gt; from the connected data source and stages it in the &lt;strong&gt;connector space&lt;/strong&gt;. It detects changes and marks them as pending import for processing. Staging objects in the connector space ensures only modified data is synchronized, improving efficiency.&lt;/p&gt;

&lt;h3&gt;
  
  
  Synchronization
&lt;/h3&gt;

&lt;p&gt;This process updates the metaverse with new or changed data from the connector space (inbound syncronization) and propagates updates back from metaverse to the connector space (outbound synchronization).&lt;br&gt;
New objects maybe created (projected), linked to existing records (join), or updated as needed.&lt;/p&gt;

&lt;h3&gt;
  
  
  Export
&lt;/h3&gt;

&lt;p&gt;Changes staged in the connector space as &lt;strong&gt;pending export&lt;/strong&gt; are sent to the connected data source. Since the sync engine doesn’t maintain a persistent connection, it verifies changes by re-importing data to confirm successful updates.&lt;/p&gt;

&lt;p&gt;Note: Sync engine does not maintain a live, continuous connection to external systems. Instead, it imports data on a scheduled basis to verify changes and confirm that exports were applied correctly.&lt;/p&gt;

&lt;h3&gt;
  
  
  Synchronization rules
&lt;/h3&gt;

&lt;p&gt;Inbound and outbound syncronization both controlled by &lt;strong&gt;synchronization rules&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Inbound Synchronization Rules (ISR)&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;They define how the data flows from connector space to the metaverse.&lt;br&gt;
They determine whether objects should be &lt;strong&gt;joined&lt;/strong&gt;, &lt;strong&gt;projected (creating new objects) ** , or **updated&lt;/strong&gt; and specify which attributes should be mapped to the metaverse.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Outbound Synchronization Rules (OSR)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Define how data flows from the metaverse to the connector space. They determine whether changes in the metaverse should be applied to connected data sources, including &lt;strong&gt;updating&lt;/strong&gt; attributes, &lt;em&gt;provisioned(creating new objects)&lt;/em&gt;&lt;em&gt;, or **deprovisioning&lt;/em&gt;* (disconnecting/deleting) objects.&lt;/p&gt;

&lt;p&gt;In summary: new objects may be projected into the metaverse (&lt;strong&gt;projection&lt;/strong&gt;), linked to existing records (join), or updated as needed. If a metaverse object needs to be created in a connected data source, it is &lt;strong&gt;provisioned&lt;/strong&gt; into the corresponding connector space.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbum3wpu25z54w1lyntof.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbum3wpu25z54w1lyntof.png" alt="Rules" width="800" height="289"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In Part 2, we’ll see more about the objects created in each space!&lt;/p&gt;

</description>
      <category>azure</category>
    </item>
    <item>
      <title>Entra ID Hybrid joined: SSO and understanding PRT- Part 2</title>
      <dc:creator>Merényi Mónika</dc:creator>
      <pubDate>Thu, 06 Feb 2025 11:44:33 +0000</pubDate>
      <link>https://dev.to/neontiger12/entra-id-hybrid-joined-sso-and-understanding-prt-part-2-1a5d</link>
      <guid>https://dev.to/neontiger12/entra-id-hybrid-joined-sso-and-understanding-prt-part-2-1a5d</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In this exercise, we will focus on enabling Single Sign-On (SSO) for seamless user authentication across cloud and on-premises resources. We will also dive into the details of the Primary Refresh Token (PRT), a critical component of the SSO experience in hybrid identity environments. To test this setup, we’ll deploy a client machine and hybrid join it to Microsoft Entra ID.&lt;/p&gt;

&lt;h2&gt;
  
  
  Part 2
&lt;/h2&gt;

&lt;p&gt;Let’s apply what we learned in the previous section. In this part, we will create a new client VM and enable SSO. We’ll set up Entra ID-based login for the VM and connect using a user account synced from the on-premises Active Directory.&lt;/p&gt;

&lt;p&gt;Before you begin, make sure to start your DC1 virtual machine, as you will need it throughout this exercise.&lt;/p&gt;

&lt;h2&gt;
  
  
  Deploying the client Virtual Machine
&lt;/h2&gt;

&lt;p&gt;Check my previous post about how to deploy a resource using biceps template:&lt;br&gt;
&lt;a href="https://dev.to/neontiger12/deploying-and-configuring-a-hybrid-identity-lab-using-bicep-part-1-active-directory-setup-and-2eo7"&gt;https://dev.to/neontiger12/deploying-and-configuring-a-hybrid-identity-lab-using-bicep-part-1-active-directory-setup-and-2eo7&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can pull the required files from my Git repository:&lt;br&gt;
&lt;a href="https://github.com/neontiger12/EntraConnect" rel="noopener noreferrer"&gt;https://github.com/neontiger12/EntraConnect&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's jump straight into the deployment.&lt;br&gt;
We will deploy a Win11 client machine into a new resource group: Hybrid_Client_RG to westeurope.&lt;/p&gt;

&lt;p&gt;It will use the same Vnet, subnet as the DC1 deployed in the &lt;strong&gt;Deploying and Configuring a Hybrid Identity Lab Using Bicep - Part 1&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Resource group
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;az group create --name Hybrid_Client_RG --location westeurope&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Deploy the VM into the resource group
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;az deployment group create --resource-group Hybrid_Client_RG --template-file main-client.bicep&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;You need to specify the admin username and password.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Verify
&lt;/h3&gt;

&lt;p&gt;Wait until the deployment is finished with the provisioning state "Succeeded".&lt;br&gt;
Check the resource also in Azure.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Connect to the machine
&lt;/h3&gt;

&lt;p&gt;Connect » Connect » Download RDP file&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq4nfwmww0owkz3wlyhy6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq4nfwmww0owkz3wlyhy6.png" alt="connect" width="800" height="295"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmbfl0z7ozernvze4e39g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmbfl0z7ozernvze4e39g.png" alt="Download RDP" width="800" height="913"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Login to the machine with the admin user you created during the deployment.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Add the VM to the domain
&lt;/h3&gt;

&lt;p&gt;Search for "domain" » Access work or school account » &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3xmjw6el88gqnlvogk2u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3xmjw6el88gqnlvogk2u.png" alt="work or school" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Add account: Access » Work or school&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fit0vn0jv5k3zrb0065ou.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fit0vn0jv5k3zrb0065ou.png" alt="add account" width="800" height="166"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click Join this device to the local Active Directory domain at the bottom of the window.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff9yfh7hvhgi13dzqs54i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff9yfh7hvhgi13dzqs54i.png" alt="domain" width="800" height="763"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Add your local domain. Next.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flz8qk8hckpee3ghvco7a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flz8qk8hckpee3ghvco7a.png" alt="local" width="800" height="306"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Sign in with your domain account.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F361fs7qdogb9vptlnr1j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F361fs7qdogb9vptlnr1j.png" alt="sign in" width="800" height="564"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Add your user as an Administrator.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg287q7ra26ufr2ggvxrn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg287q7ra26ufr2ggvxrn.png" alt="admin" width="800" height="431"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After successfully adding the VM to the domain you will need to restart it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4m0uf6e0oetykvajivem.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4m0uf6e0oetykvajivem.png" alt="Restart" width="800" height="235"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Give it some time to restart and reconnect.&lt;/p&gt;

&lt;p&gt;Note: Since we are not using a static public IP, if the VM was stopped (deallocated), it will be assigned a new IP address upon restart.&lt;/p&gt;

&lt;p&gt;After you signed back run the &lt;em&gt;dsregcmd /status&lt;/em&gt; command. The dsregcmd command helps you to understand the state of devices in Microsoft Entra ID. &lt;/p&gt;

&lt;p&gt;As you can see, our device is domain-joined but not yet Azure AD (Entra ID) joined. The PRT status is also 'No' because we haven’t set up SSO yet.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs9tpflrwqenh1oz52swo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs9tpflrwqenh1oz52swo.png" alt="dsregcmd" width="800" height="723"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Add the device to Entra ID
&lt;/h3&gt;

&lt;p&gt;Same way like you added the device to the domain go to Accounts » Access work or school » Connect&lt;/p&gt;

&lt;p&gt;Sign in with Global admin or Hybrid Identity Admin user.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8r7ovkdm3kz6gry43b36.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8r7ovkdm3kz6gry43b36.png" alt="admin" width="800" height="734"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdmc2s1hi2pufe2npixod.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdmc2s1hi2pufe2npixod.png" alt="sign in" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After successfully authenticated you are all set! :)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj7wdi4ufjadbb8f24jq7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj7wdi4ufjadbb8f24jq7.png" alt="All set" width="800" height="646"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You should now see both your domain and Entra ID account:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3f94dw066h4ve605gpod.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3f94dw066h4ve605gpod.png" alt="Both available" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's now check the status again with dsregcmd /status&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbgkm4g8mgqe7wt8owbuz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbgkm4g8mgqe7wt8owbuz.png" alt="Still no" width="800" height="319"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;AzureAdJoined still shows as NO.&lt;/p&gt;

&lt;p&gt;Good practice to run the dsregcmd /join command to force the join process.&lt;/p&gt;

&lt;p&gt;The dsregcmd /join command is used to manually join a Windows device to Entra ID in a hybrid Azure AD join scenario. It is especially useful when automatic device registration fails or when a device needs to be re-registered.&lt;/p&gt;

&lt;p&gt;Now check the status again:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb5ev4rzfrwnt626z42ub.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb5ev4rzfrwnt626z42ub.png" alt="status" width="800" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now the AzureAdJoined is Yes.&lt;/p&gt;

&lt;h3&gt;
  
  
  7. Now setup the SSO in DC1
&lt;/h3&gt;

&lt;p&gt;Login to the DC1 VM. Start Entra Connect Sync and click Configure.&lt;br&gt;
Choose "Change user sign in" option and click Next.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flyw5q1q0na1ohl0zne73.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flyw5q1q0na1ohl0zne73.png" alt="Sign in" width="800" height="558"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Enable SSO and set the sign in option to Password Hash Sync.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwb82nzha2i5q5rto43y9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwb82nzha2i5q5rto43y9.png" alt="SSO" width="800" height="541"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Provide Domain Administrator credentials for each Windows Server AD forest that:&lt;/p&gt;

&lt;p&gt;Is synced to Microsoft Entra ID using Microsoft Entra Connect.&lt;br&gt;
Contains users for whom you want to enable Seamless SSO.&lt;br&gt;
Once you complete the wizard, Seamless SSO will be enabled for your tenant.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiuryzoh5l0nvni7twe2d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiuryzoh5l0nvni7twe2d.png" alt="SSO" width="800" height="563"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Login to Azure to check the SSO status:&lt;/p&gt;

&lt;p&gt;Entra ID »  Microsoft Entra Connect » Connect Sync&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpgi1vid8qbmoahbrj0c2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpgi1vid8qbmoahbrj0c2.png" alt="SSO status" width="800" height="526"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;NOTE:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3wmxn0t2uij7zvhnanih.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3wmxn0t2uij7zvhnanih.png" alt="computers" width="800" height="382"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Seamless SSO creates a computer account named AZUREADSSOACC in each on-premises Windows Server AD forest. To ensure security:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Restrict management to Domain Administrators.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Right click on AZUREADSSOACC » Properties » Security&lt;br&gt;
  Make sure only Domain Admins have full control.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Disable Kerberos delegation on the account.&lt;br&gt;
Right click on AZUREADSSOACC » Properties » Delegation&lt;br&gt;
Select "Do not trust this computer for delegation" » Click OK.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ensure no other accounts have delegation permissions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Store the account in an Organizational Unit (OU) to prevent accidental deletion and limit access to Domain Administrators.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  8. Connect with the user account synced from AD
&lt;/h3&gt;

&lt;p&gt;Firt we need to install an extension to the VM. For this go to your VM » Settings » Extensions + applications » Add&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwb1mz86or71onuwg94eb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwb1mz86or71onuwg94eb.png" alt="Extension" width="800" height="595"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Install the Azure AD based Windows Login Extension:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxg0ytccfot6fnupas5a8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxg0ytccfot6fnupas5a8.png" alt="Extension" width="800" height="931"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Go back to your VM » Security » Identity&lt;br&gt;
Enable the System Assigned Managed Identity, this allows the VM to authenticate with Entra ID.&lt;br&gt;
SAVE.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd7w531u1ypwtn672y56m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd7w531u1ypwtn672y56m.png" alt="Identity" width="800" height="778"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Add one of the Virtual Machine Administrator Login role to the user you selected for this test.&lt;/p&gt;

&lt;p&gt;Access Control (IAM) » Add »» Virtual Machine Administrator Login&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frzms6529wpms354uh4wu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frzms6529wpms354uh4wu.png" alt="admin" width="800" height="324"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Select the user and assign the role.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frbykfi4nyksru6q51qvy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frbykfi4nyksru6q51qvy.png" alt="User" width="800" height="502"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Next steps:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Add your user as a remote desktop users:&lt;br&gt;
_net localgroup "remote desktop users" /add "&lt;a href="mailto:cloudup1@neontiger12.com"&gt;cloudup1@neontiger12.com&lt;/a&gt;"&lt;br&gt;
_&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F386akojm4r4l3tk8jco9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F386akojm4r4l3tk8jco9.png" alt="local" width="800" height="83"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next:&lt;/p&gt;

&lt;p&gt;In your client VM check if RDP is enabled.&lt;br&gt;
Settings » System » Remote Desktop&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy1me7fsc6zpb4xdn2c95.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy1me7fsc6zpb4xdn2c95.png" alt="RDP" width="800" height="784"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Check the Select Require devices to use Network Level Authentication to connect option.&lt;/p&gt;

&lt;p&gt;Log out from the machine.&lt;br&gt;
Lookup the RPD file you downloaded for the client and make a copy of it, edit the copy and add following line at the end:&lt;/p&gt;

&lt;p&gt;enablecredsspsupport:i:1&lt;/p&gt;

&lt;p&gt;Login with your selected user:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5yw4wr447rl0v4r7pyr0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5yw4wr447rl0v4r7pyr0.png" alt="login" width="800" height="435"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After login check the status of the PRT, now you should see it as Yes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiq2jlqzmcbgbah1dnn4o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiq2jlqzmcbgbah1dnn4o.png" alt="PRT yes" width="800" height="215"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Open Edge and enter: &lt;a href="https://myapps.microsoft.com/neontiger12.com" rel="noopener noreferrer"&gt;https://myapps.microsoft.com/neontiger12.com&lt;/a&gt; &lt;br&gt;
Change your domain address accordingly.&lt;/p&gt;

&lt;p&gt;Myapps portal should available without the asking the user to login.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fia0hwuydhue8dpsn4xjx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fia0hwuydhue8dpsn4xjx.png" alt="myapps" width="800" height="521"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Read more about this topic:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://learn.microsoft.com/en-us/entra/identity/devices/howto-vm-sign-in-azure-ad-windows" rel="noopener noreferrer"&gt;https://learn.microsoft.com/en-us/entra/identity/devices/howto-vm-sign-in-azure-ad-windows&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://learn.microsoft.com/en-us/entra/identity/hybrid/connect/how-to-connect-sso-quick-start" rel="noopener noreferrer"&gt;https://learn.microsoft.com/en-us/entra/identity/hybrid/connect/how-to-connect-sso-quick-start&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Entra ID Hybrid joined: SSO and understanding PRT- Part 1</title>
      <dc:creator>Merényi Mónika</dc:creator>
      <pubDate>Wed, 22 Jan 2025 22:34:07 +0000</pubDate>
      <link>https://dev.to/neontiger12/entra-id-hybrid-joined-sso-and-understanding-prt-part-1-49jd</link>
      <guid>https://dev.to/neontiger12/entra-id-hybrid-joined-sso-and-understanding-prt-part-1-49jd</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In this exercise, we will focus on enabling Single Sign-On (SSO) for seamless user authentication across cloud and on-premises resources. We will also dive into the details of the Primary Refresh Token (PRT), a critical component of the SSO experience in hybrid identity environments. To test this setup, we’ll deploy a client machine and hybrid join it to Microsoft Entra ID.&lt;/p&gt;

&lt;h2&gt;
  
  
  Part 1.SSO and PRT introduction
&lt;/h2&gt;

&lt;p&gt;Before creating our new device, let's discuss:&lt;/p&gt;

&lt;h3&gt;
  
  
  What is Single Sign-On (SSO)?
&lt;/h3&gt;

&lt;p&gt;SSO is an authentication method that lets users sign-in to multiple applications and systems with a single set of login credentials. Authenticate once and access all the connected resources seamlessly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advantages:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Convenient for the user:&lt;/strong&gt; they don't have to remember separate credentials for different applications.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Security:&lt;/strong&gt; centralized management of authentication, if a user left the company all it's related access will be revoked. Users don't use the same password multiple times.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Efficiency:&lt;/strong&gt; reduces the time needed for login. Reduces the number of tickets for the password reset.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Key Protocols Used in SSO&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Two key protocol is used for SSO in the cloud.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. SAML (Security Assertion Markup Language)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Open source standard to securely exchange authentication and authorization information between an Identity Provider (IdP) and a Service Provider (SP).&lt;br&gt;
It uses an &lt;strong&gt;XML SAML assertion&lt;/strong&gt; (security token) to provide the access to the service.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. OpenID Connect (OIDC)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Built on top of Oauth2.0. Provides authentication by verifying the user's identity and issue an ID token.&lt;br&gt;
ID token: &lt;strong&gt;Json web token (JWT)&lt;/strong&gt; has claims about the user (like username, email, authorization status..)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to decide which one to use?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Choose OIDC if you're working with modern, cloud-native apps or APIs that require lightweight communication and JSON support.&lt;/p&gt;

&lt;p&gt;Opt for SAML if you're integrating with legacy applications or enterprise systems already using SAML.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Quick mention about the on-premise authentication protocols used for SSO:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Kerberos&lt;/strong&gt;&lt;br&gt;
A network authentication protocol that uses &lt;strong&gt;tickets&lt;/strong&gt; to allow nodes to prove their identity in a secure manner.&lt;br&gt;
Commonly used for SSO in Windows environments.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;WS-Federation&lt;/strong&gt;&lt;br&gt;
Enables SSO by allowing trust relationships between security domains to federate identity.&lt;br&gt;
Commonly used for legacy systems for federated identity management.&lt;br&gt;
Example: Using Microsoft Entra ID to authenticate to SharePoint on-premises.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SSO options:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Active Directory Federation Service:&lt;br&gt;
Used for federated domains&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Seamless Single Sign-on:&lt;br&gt;
Uses a combination of Kerberos and SAML for authentication.&lt;br&gt;
Used in legacy Win 7 and 8.1.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;3. Primary Refresh Token&lt;/strong&gt;&lt;br&gt;
Json web token issued for Win10 , Server 2016 and above, iOS, Android to enable SSO.&lt;br&gt;
For &lt;strong&gt;Entra ID joined **or **hybrid joined&lt;/strong&gt; device the PRT is issued when the &lt;strong&gt;user logs in&lt;/strong&gt;.&lt;br&gt;
For &lt;strong&gt;Entra ID registered&lt;/strong&gt; device the PRT is issued when a &lt;strong&gt;user adds a secondary work/school account&lt;/strong&gt; or enable "Allow my organization to manage this device" when signing in to a web application:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnfr9au463t1sojjlf8a7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnfr9au463t1sojjlf8a7.png" alt="Allow" width="800" height="303"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;An &lt;strong&gt;Entra-joined machine&lt;/strong&gt; is typically a corporate-owned device used in cloud-first scenarios where there is no on-premises infrastructure. Users sign in using their Microsoft Entra ID credentials, and the device is managed through Intune.&lt;/p&gt;

&lt;p&gt;An &lt;strong&gt;Entra hybrid joined device&lt;/strong&gt; is joined to the on-premise domain registered to Entra ID.It is typically corporate-owned and relies on the on-premises Active Directory for authentication. These devices can be managed using Group Policy, SCCM, or Intune.&lt;/p&gt;

&lt;p&gt;An &lt;strong&gt;Entra-registered device&lt;/strong&gt; is typically a BYOD (Bring Your Own Device) where users sign in with local or personal credentials rather than an organizational account. These devices can be managed using Intune or Microsoft Endpoint Manager (MEM).&lt;/p&gt;




&lt;h3&gt;
  
  
  Primary Refresh Token
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Key terms&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cloud Authentication Provider - CloudAP:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Handle the &lt;strong&gt;authentication process&lt;/strong&gt; during login.&lt;/li&gt;
&lt;li&gt;Verify user credentials.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Entra CloudAP Plugin (CloudAP Plugin):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Built on the CloudAP framework.&lt;/li&gt;
&lt;li&gt;Request the PRT.&lt;/li&gt;
&lt;li&gt;Cache the PRT for seamless access.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Entra WAM plugin:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Enable SSO for application that rely on Entra ID for authentication.&lt;/li&gt;
&lt;li&gt;Allow the use of existing credentials.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;DSREG:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Entra component on a Windows 10 (and above) machine that handles device registrations.
! We will use dsreg command line tool a lot for checking status and troubleshooting.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What is in the PRT?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Device ID:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Identify the device&lt;/strong&gt; to which the PRT is issued.&lt;br&gt;
The deviceID claim is part of the tokens issued using the PRT. &lt;br&gt;
It helps &lt;strong&gt;enforce Conditional Access policies&lt;/strong&gt; by checking the device's state or compliance. &lt;br&gt;
Tokens include this claim to ensure secure and policy-compliant access.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Session ID:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Encrypted symmetric key, generated by Entra authentication service, issued as part of the PRT.&lt;br&gt;
Securely transferred to the clients machine and stored in the TPM.&lt;br&gt;
Acts as a proof of possession when issuing for tokens.&lt;br&gt;
(No one can extract it from the TPM)&lt;br&gt;
Rotated if the key is older than 30 days.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How PRT is issued&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;PRT is issued only to Entra registered devices (joined, hybrid joined, registered).&lt;br&gt;
During the registration process DSREG creates two asymetric key pairs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Device Key (dkpub/dkpriv):&lt;/strong&gt;
Key associated with a registered device, used to verify the 
device's identity to Microsoft Entra ID and other services.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Transport Key (tkpub/tkpriv):&lt;/strong&gt;
Encrypts data during its transfer, ensuring secure communication 
between the client and the server.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The private keys are bound to the machine TPM (if has one) and the public is sent to Entra ID during the registration process.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How PRT is used&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;During user login the Entra CloudAP plugin request the PRT from Entra ID and caches it for seamless (or offline) use.&lt;/p&gt;

&lt;p&gt;The WAM Plugin is used when the user tries to access an application.&lt;br&gt;
Request access and refresh token to application using WAM plugin. Enables SSO by injecting the PRT into the browser request.&lt;br&gt;
Browser SSO is supported on Microsoft Edge, Chrome (via Windows 10 Accounts), and Mozilla Firefox v91+ (with the Firefox Windows SSO setting).&lt;/p&gt;

&lt;p&gt;For Entra ID registered devices the whole process is handled by the WAM plugin because there is no Windows login.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lifespan of the PRT&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The PRT is valid for 14 days and it is continuously renewed on active device.&lt;/p&gt;

&lt;p&gt;Now, we know everything about SSO and PRT. We will try this out in the next post!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Deploying and Configuring a Hybrid Identity Lab Using Bicep - Part 2: Authentication options (PHS, PTA)</title>
      <dc:creator>Merényi Mónika</dc:creator>
      <pubDate>Mon, 20 Jan 2025 21:10:39 +0000</pubDate>
      <link>https://dev.to/neontiger12/deploying-and-configuring-a-hybrid-identity-lab-using-bicep-part-2-authentication-options-phs-1oec</link>
      <guid>https://dev.to/neontiger12/deploying-and-configuring-a-hybrid-identity-lab-using-bicep-part-2-authentication-options-phs-1oec</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In this second part of our lab exercise, we shift focus to exploring authentication methods, discussing Password hash sync and Pass-through authentication in detail. These features are essential for improving user experience and enhancing security in hybrid identity environments.&lt;/p&gt;

&lt;p&gt;This post assumes you’re familiar with basic security concepts like hashing and encryption. Don’t worry. I’ll explain everything in a clear and simple way! 😊&lt;/p&gt;




&lt;h2&gt;
  
  
  Goal
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;By the end of this exercise, you will:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Configure multiple authentication methods&lt;/strong&gt; in Entra ID (Password Hash Sync, Pass-through Authentication).&lt;/p&gt;

&lt;p&gt;Let's jump right in! :)&lt;/p&gt;

&lt;h2&gt;
  
  
  Recap what we have so far:
&lt;/h2&gt;

&lt;p&gt;We deployed a virtual network and a server including all of its necessary components like network interface card, static private IP address (10.1.1.5). The server acts as a Domain Controller and a DNS server. We successfully synchronized users from on-premise to Entra ID. &lt;/p&gt;

&lt;h2&gt;
  
  
  Discussing the authentication options
&lt;/h2&gt;

&lt;p&gt;While we value the on-premises data source, the focus is shifting towards leveraging the cloud to reduce reliance on on-premises resources.&lt;/p&gt;

&lt;p&gt;One way to achieve this is by enabling &lt;strong&gt;Password Hash Synchronization (PHS)&lt;/strong&gt;. With PHS, authentication is handled by Entra ID, which uses a securely stored hash of the on-premises password hash to validate sign-in requests.&lt;/p&gt;

&lt;p&gt;This approach allows users to continue using their familiar AD passwords, but authentication is managed entirely by Entra ID rather than the on-premises Active Directory. This shift enhances reliability, reduces dependency on on-premise infrastructure, and supports cloud-first strategies while providing a good user experience by eliminating the need to remember separate credentials. This also reduces helpdesk costs by minimizing the volume of password reset requests.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Are you ready to dig a little bit deeper in this topic?&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How PHS works?
&lt;/h2&gt;

&lt;p&gt;Active Directory domain service stores the user's password in a hash format. The hash is a result of a one-way mathematical function, there is no way to revert back to the original plain text. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;On the DC passwords are stored as NT hashes&lt;/strong&gt;, which are based on MD4 algorithm. You are right if you ask: isn't it weak? Indeed, MD4 is considered as a weak hash algorithm by modern standards, however it is used to ensure compatibility with older systems.&lt;/p&gt;

&lt;p&gt;Don't worry. The process implement security features for the data in transit between the AD and the PHS agent on the Entra Connect Sync server. Entra Connect Sync agent will make sure the hash is secure enough to meet modern standards.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Sync:&lt;/strong&gt;&lt;br&gt;
 &lt;strong&gt;Every 2 minutes&lt;/strong&gt; the PHS agent queries the AD DC for the password hash, it uses a standard replication protocol called &lt;strong&gt;MS-DRSR&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;MS-DRSR (Directory Replication Service Remote Protocol)&lt;/strong&gt; is an RPC(Remote Procedure Call) protocol that facilitates replication and management of Active Directory data between Domain Controllers. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Secure the hash before sending:&lt;/strong&gt;&lt;br&gt;
The DC creates a key from the MD5 hash of the RPC session key and a salt.&lt;br&gt;
Encryption key = MD5# session key + a salt.&lt;br&gt;
The password hash is encrypted with this key.&lt;/p&gt;

&lt;p&gt;Salt is simply an added security mechanism, making the hash unique even if the passwords are the same.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Data transmit:&lt;/strong&gt;&lt;br&gt;
DC sends the encrypted hash, and the salt separately (the salt itself is not encrypted) to the PHS agent over RPC (Remote Procedure Call).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Decryption: &lt;br&gt;
**The synchronization agent&lt;/strong&gt; uses the MD5 hash of the RPC session key combined with the salt to &lt;strong&gt;generate the decryption key&lt;/strong&gt;. This key is then used to decrypt the encrypted MD4 password hash sent by the DC.&lt;/p&gt;

&lt;p&gt;Just for fun: the decryption key is generated by the &lt;strong&gt;MD5CryptoServiceProvider&lt;/strong&gt; which is .NET framework that provides a managed implementation of the MD5 hash algorithm.&lt;/p&gt;

&lt;p&gt;If you worried about the MD4 not being secure enough you can relax :).&lt;br&gt;
Entra Connect Sync makes sure the password hash is secure even by the strictest security standards. Let’s explore how it achieves this level of protection.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Making the hash secure:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;a. Expanding the size of the hash from 16 bytes to 64 bytes.&lt;br&gt;
b. The agent adds a 10 byte per-user salt to further protect the hash.&lt;br&gt;
c. The 64 bytes hash and the 10 bytes user specific salt is combined and put through the &lt;strong&gt;Password-Based Key Derivation Function 2 (PBKDF2)&lt;/strong&gt;&lt;br&gt;
PBKDF2 applies the HMAC-SHA256 &lt;strong&gt;hashing algorithm 1,000 times&lt;/strong&gt; to the input. This computational effort makes the hash much more resistant to attacks. &lt;br&gt;
&lt;strong&gt;HMAC (Hash-based Message Authentication Code) with SHA-256&lt;/strong&gt; is a strong hashing algorithm used to generate a final 32-byte hash.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Sending to Entra ID:&lt;/strong&gt;&lt;br&gt;
The final 32 byte hash is sent to Entra ID over a secure TLS connection along with the user-specific salt and the iteration count.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. Authentication:&lt;/strong&gt;&lt;br&gt;
When a user attempts to authenticate, their password undergoes the same hashing process. If the resulting hash matches the securely stored value, the user is successfully authenticated.&lt;/p&gt;

&lt;p&gt;The user might have to enter their corporate credentials when authenticating to Entra ID even if they already authenticated on-prem. However, the "Keep me signed in" option creates a session cookie that allows users to stay signed in for up to 180 days.&lt;br&gt;
The session cookies also follow corporate security policies, adding an assurance of security.&lt;/p&gt;

&lt;p&gt;Additionally, you can minimize password prompts by configuring Microsoft Entra join or Microsoft Entra hybrid join devices. These configurations enable automatic sign-ins for users on their corporate devices when connected to the corporate network.&lt;/p&gt;

&lt;p&gt;I hope this diagram I created helps you understand the process better, as it provides an overview about what is happening.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F19lol92plrwvzbltldin.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F19lol92plrwvzbltldin.png" alt="PHS diagram" width="800" height="599"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Checking the PHS status
&lt;/h2&gt;

&lt;p&gt;If you remember we enabled PHS when we setup the Connect Sync:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyj7wkujgha0n2ft10106.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyj7wkujgha0n2ft10106.png" alt="Sign in" width="800" height="504"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can, however, still enable or disable this option with Entra Connect Sync:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Configure sync options in Entra Connect:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7vhmc8k2ga6beo3f33y8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7vhmc8k2ga6beo3f33y8.png" alt="Configure" width="800" height="563"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Configure synchronization options:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F468vqwmrg8y50n832thw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F468vqwmrg8y50n832thw.png" alt="Sync options" width="800" height="560"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Authenticate and go to Optional features:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq3uw9y9t70o1kyn3i8u9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq3uw9y9t70o1kyn3i8u9.png" alt="Connect Sync" width="800" height="670"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Confirmation and troubleshooting
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Let's check the status of the sync in Entra ID:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In the portal go to Entra ID » Microsoft Entra Connect » Connect Sync&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fve9znglkpybs7ufpf4oc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fve9znglkpybs7ufpf4oc.png" alt="PHS enabled" width="800" height="405"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can see that the PHS is enabled.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use the following command-line tool to validate sync status:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Invoke-ADSyncDiagnostics -PasswordSync&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0wuzva57vqz3y3s4mg47.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0wuzva57vqz3y3s4mg47.png" alt="Output" width="800" height="493"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's review the output:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AAD Tenant - calcio15gmail.onmicrosoft.com&lt;/strong&gt;&lt;br&gt;
&lt;em&gt;Password Hash Synchronization cloud configuration is enabled&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;» this means that the PHS is enabled on the Entra side. No issue here.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AD Connector - neontiger.local&lt;/strong&gt;&lt;br&gt;
&lt;em&gt;Password Hash Synchronization is enabled&lt;br&gt;
Latest Password Hash Synchronization heartbeat is detected at: 01/19/2025 16:33:28 UTC&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;» this means that the PHS is enabled on the AD side. It shows the latest heartbeat. No issue here.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Check the time of the latest sync:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Last successful attempt to synchronize passwords from this directory partition started at: 1/19/2025 4:5&lt;br&gt;
1:29 PM UTC and ended at: 1/19/2025 4:51:29 PM UTC&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Only Use Preferred Domain Controllers: False&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Verify the connectivity to the domain:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Checking connectivity to the domain...&lt;br&gt;
Domain "neontiger.local" is reachable&lt;/p&gt;

&lt;p&gt;Let's assume you want to troubleshoot the PHS issue for one particular user.&lt;/p&gt;

&lt;p&gt;At the end on the output it ask you:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Did you find Password Hash Sync General Diagnostics helpful? [y/n]: y&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Your answer, yes or no it doesn't matter :).&lt;/p&gt;

&lt;p&gt;The next question is:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Would you like to diagnose single object issues? [y/n]: y&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Yes, you would like :).&lt;/p&gt;

&lt;p&gt;Copy the distinguished name from: Users and Computers » Users » right click on the user » Properties » Attribute Editor » distinguishedName&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5hst2l4a5i9oh52ea9nq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5hst2l4a5i9oh52ea9nq.png" alt="Distinguished" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Paste it:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Please enter AD connector space object Distinguished Name: CN=CloudUp1,CN=Users,DC=neontiger,DC=local&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Check the output:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frri8ac92l7do0aj17rjc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frri8ac92l7do0aj17rjc.png" alt="Output" width="800" height="592"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The object is available in the AD connector space - neontiger.local&lt;br&gt;
The object is a connector, it has a link to the metaverse&lt;br&gt;
The object is synced to the AAD connector space&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;» Here you can verify the status of the object in the connector space.&lt;/p&gt;

&lt;p&gt;We would like to see this output at the end:&lt;/p&gt;

&lt;p&gt;_Password hash is synchronized successfully _&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; &lt;br&gt;
You can run the Invoke-ADSyncDiagnostics cmdlet without any parameter and navigate through the different diagnostic options.&lt;br&gt;
Feel free to explore it! :)&lt;/p&gt;

&lt;p&gt;If that wasn't enough, then run this script that might further help you with the troubleshooting process:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://learn.microsoft.com/en-us/entra/identity/hybrid/connect/tshoot-connect-password-hash-synchronization#get-the-status-of-password-sync-settings" rel="noopener noreferrer"&gt;https://learn.microsoft.com/en-us/entra/identity/hybrid/connect/tshoot-connect-password-hash-synchronization#get-the-status-of-password-sync-settings&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is a comprehensive guide from Microsoft in case you face any issue here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://learn.microsoft.com/en-gb/entra/identity/hybrid/connect/tshoot-connect-password-hash-synchronization" rel="noopener noreferrer"&gt;https://learn.microsoft.com/en-gb/entra/identity/hybrid/connect/tshoot-connect-password-hash-synchronization&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This setup now should allow your users to sign-in to cloud applications with their on-premise password.&lt;/p&gt;

&lt;p&gt;To verify this quickly, go to DC1 and select a user from your on-premises Active Directory. Use their credentials to sign in to office.com. Voilà, your user signed in to a cloud application without creating a username/password in that application.&lt;/p&gt;

&lt;p&gt;Keep in mind that you set the default password for these users in the users.ps1 script. If you haven’t changed it since, you should already know what it is. 😊&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Next up, we'll explore the Pass-through authentication as an alternate sign-in option.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Pass-through authentication (PTA)
&lt;/h2&gt;

&lt;p&gt;Pass-through authentication (PTA) allows users to authenticate to cloud applications using their Active Directory (AD) credentials. However, in this case, the authentication is handled by the on-premises Active Directory rather than Entra ID.&lt;br&gt;
This option is ideal for organisation that want to keep authentication processes within their own infrastructure for compliance or control reasons.&lt;/p&gt;

&lt;p&gt;Note: only AD synced users can authenticate with this method.&lt;/p&gt;

&lt;h2&gt;
  
  
  How PTA works
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Components involved in the PTA authentication:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Microsoft Entra Security Token Service (STS):&lt;/strong&gt;&lt;br&gt;
Stateless service used to handle sign-in requests and issue security tokens to browsers, clients, or services.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Azure Service Bus:&lt;/strong&gt;&lt;br&gt;
Azure Service Bus is a cloud-based messaging service enabling communication between applications and services. It offers features like message queues and publish-subscribe topics to decouple applications. &lt;br&gt;
Publish-subscribe topics allow multiple publishers (any application, service, or component, whether on-premises or cloud-based) to send messages to a central topic, which subscribers can receive based on their filtering rules, ensuring efficient and scalable communication.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Microsoft Entra Connect Authentication Agent:&lt;/strong&gt;&lt;br&gt;
The on-premise component responsible for listening and responding to the password validation requests.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Azure SQL Database:&lt;/strong&gt;&lt;br&gt;
Holds authentication agents information including their metadata and encryption key.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Windows Server AD:&lt;/strong&gt;&lt;br&gt;
On-prem AD, where the user account and their associated password is stored.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Install and register authentication agents&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can enable PTA two ways:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;When you first setup Entra Connect Sync:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Choose Pass-through authentication as a Sign-in option instead of Password Hash Sync.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Modify the Sign-in option with the Entra Connect Sync wizard&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;More on these options when we enable PTA in our environment.&lt;/p&gt;

&lt;p&gt;The authentication agent is installed and registered with Entra ID when you enable PTA.&lt;/p&gt;

&lt;p&gt;The preparation of the authentication agent involves three main phases:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Installation&lt;/li&gt;
&lt;li&gt;Registration&lt;/li&gt;
&lt;li&gt;Initialization&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now, let's uncover each phase in details.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Installation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For the installation and registration process you need a user with either Hybrid Identity Administrator or a Global Admin.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Two methods available to install the agent:&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Enabling Pass-Through Authentication (PTA) with Entra Connect:&lt;/strong&gt; &lt;br&gt;
This method integrates the authentication agent during the Entra Connect setup process.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Standalone Installation:&lt;/strong&gt; &lt;br&gt;
You can also install the authentication agent separately by downloading the installer and configuring it manually.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Agent registration:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;After installation, the agent registers with Entra ID.&lt;/li&gt;
&lt;li&gt;Entra then issues a certificate, facilitating secure communication between the agent and Entra ID. This process also binds the authentication agent to the tenant, ensuring Entra recognizes which agent is authorized to handle password validation requests. &lt;/li&gt;
&lt;li&gt;This procedure must be repeated for each agent you register.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Let's see it in detail:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;During setup, the Hybrid Identity Administrator (or Global Admin) authenticates to Entra ID. In the sign-in process the authentication agent receives an access token allowing it to act on behalf of the user.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The authentication agent generates an RSA 2048-bit public-private key pair. The private key is securely stored on the on-premises server where the agent resides.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;Note:&lt;/em&gt;&lt;br&gt;
As of now, RSA 2048-bit encryption is still in use. However, recent guidelines recommend upgrading to more secure encryption by the end of 2025. Stay tuned for Microsoft announcements to see if any action is needed from your side.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The authentication agent sends a registration request to Entra ID over HTTPS, including the components:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;The access token&lt;/li&gt;
&lt;li&gt;The public key&lt;/li&gt;
&lt;li&gt;A Certificate Signing Request (CSR) applying for the digital identity certificate&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Entra verifies the request:&lt;br&gt;
Is come from an authorized user?&lt;br&gt;
The access token is valid?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The root CA in Entra ID signs the digital identity certificate, which is used exclusively for the PTA feature. The certificate's subject is the tenant ID, ensuring it can only be used with your tenant.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Entra ID stores the public key in an Azure SQL database, which is accessible only by Entra.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The on-premise server stores the certificate in the Windows certificate store (CERT_SYSTEM_STORE_LOCAL_MACHINE).&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Initialization:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;The authentication agent send a secure request to Entra ID to start the process.&lt;br&gt;
Over port 443.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Entra provides an access key for a unique Service Bus queue linked to your tenant.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The agent establishes a secure (HTTPS)connection to this queue.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you have multiple authentication agents, the initialization process ensures that the agents connects to the same Service Bus queue.&lt;/p&gt;

&lt;p&gt;Now, we will dive into how the actual sign-in requests are handled.&lt;/p&gt;

&lt;h2&gt;
  
  
  PTA Sign-in requests:
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;When a user tries to access an application like Outlook Web App and is not signed in, the app redirects the browser to the Entra ID sign-in page. The Entra STS service then responds with the sign-in page.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;User enters his/her credentials.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Entra STS encrypts the password with the public key of the registered authentication agents (retrieved from Azure SQL Databese) producing one encrypted password for each registered authentication agent.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In the next step, the Entra STS places the encrypted password into the Service Bus queue specific to your tenant.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;During the initialization phase, the authentication agent configured a persistent connection to the Service Bus queue, allowing it to retrieve password validation requests.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The authentication agent decrypts the password with it's private key.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The authentication agent validate the username/password with AD DS.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The result is retrieved from AD DS is either success, username/password incorrect, or password expired.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here is a diagram explaining the PTA sign-in process:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3bb89xnnl7kostpeyv5d.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3bb89xnnl7kostpeyv5d.JPG" alt="PTA" width="645" height="484"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Transmitting passwords between servers needs strong security measures. We'll talk about these measures in the next section.&lt;/p&gt;

&lt;h2&gt;
  
  
  PTA security capabilities
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Secure multi-tented architecture:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Even though Entra is built on a shared infrastructure, each tenant's data and sign-in requests are completely isolated from one another, ensuring the organization's data remains secure and private. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;On-premises passwords are not stored in the cloud&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The connection from the authentication agents is outbound only:&lt;/strong&gt;&lt;br&gt;
The agent initiates a connection to Entra ID and retrieves password validation requests by making an outbound connection to the Service Bus queue.&lt;br&gt;
This makes sure that only outbound ports (80, 443) required:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;443 for all authenticated communications.&lt;/li&gt;
&lt;li&gt;80 to download certificate revocation lists (CRLs)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Passwords used are encrypted&lt;/strong&gt; in the cloud before sending it to the on-premise infrastructure using a secure HTTPS channel.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Works with Entra features for protecting the identity:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Conditional access policies&lt;/li&gt;
&lt;li&gt;MFA&lt;/li&gt;
&lt;li&gt;Block legacy authentication&lt;/li&gt;
&lt;li&gt;Smart lockout&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Important considerations:
&lt;/h2&gt;

&lt;p&gt;Since this solution relies on the on-premise infrastructure configure more than one server hosting authentication agent for high reliability.&lt;br&gt;
Treat them as Tier 0 systems:&lt;br&gt;
Tier 0 systems are the most critical assets in the organisation. These systems are highly privileged, must be strictly managed and protected.&lt;/p&gt;

&lt;p&gt;Now, that you are equipped with the necessary understanding about the PTA let's configure it in our environment!&lt;/p&gt;

&lt;p&gt;As already mentioned, you can enable PTA two ways:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;When you first setup Entra Connect Sync:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Choose Pass-through authentication as a Sign-in option instead of Password Hash Sync.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmc87qdg7eyipo0jqdvsp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmc87qdg7eyipo0jqdvsp.png" alt="PTA" width="800" height="562"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Check out the note there:&lt;br&gt;
Microsoft recommends that the user performing the Pass-through Authentication (PTA) setup should be a cloud-only user. This is crucial because, once Pass-through Authentication is enabled, hybrid users will be unable to sign in if there is a service disruption to the on-premises Active Directory.&lt;/p&gt;

&lt;p&gt;To avoid being locked out, ensure you have cloud only account that can manage sign-in options (and Entra).&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Modify the Sign-in option with the Entra Connect Sync wizard&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Click Configure in Entra Connect Sync.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frf4ejagkhd11suxoehmo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frf4ejagkhd11suxoehmo.png" alt="wizzard" width="800" height="563"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Choose Change user sign-in. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgmqe104oyryv5im68ali.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgmqe104oyryv5im68ali.png" alt="Change user sign-in" width="800" height="563"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Authenticate with your Hybrid Identity Admin or Global admin user.&lt;/p&gt;

&lt;p&gt;Change the Sign-in to Pass-through authentication.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw1vcd4joitb36kve48eu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw1vcd4joitb36kve48eu.png" alt="Change" width="800" height="562"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click Next.&lt;/p&gt;

&lt;p&gt;Now the Entra Connect Sync will install and initialize the authentication agent.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsz01esr1e5jeucq7yvxv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsz01esr1e5jeucq7yvxv.png" alt="Ready to configure" width="800" height="560"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click Configure and wait for the wizard to complete the task.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8n4xwvdpyuwnd37a8oyn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8n4xwvdpyuwnd37a8oyn.png" alt="Config complete" width="800" height="560"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Password hash synchronization (PHS) is enabled, as shown. It is a good practice to enable PHS even if you are using Pass-through Authentication (PTA). This is because Microsoft continuously monitors the dark web for leaked credentials and can notify you if any of your users' credentials are compromised.&lt;/p&gt;

&lt;p&gt;You can also use Password hash sync as a fallback option in case PTA experiences issues (e.g., connectivity or service outages with the on-premises agent).&lt;/p&gt;

&lt;p&gt;If you want to disable, run the wizard again and change the settings in Customize synchronization options. Disable Password hash sync.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Check if the PTA is enabled correctly:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Here's another useful troubleshooting technique using the Invoke-ADSyncDiagnostics cmdlet:&lt;/p&gt;

&lt;p&gt;We'll create a log file that displays the status of the synchronization process.&lt;/p&gt;

&lt;p&gt;Run the cmdlet, enter: 3 and wait for the result. The log file will open in Internet Explorer.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Funil7zm24jk611ngt9i3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Funil7zm24jk611ngt9i3.png" alt="invoke" width="800" height="445"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The log file will provide a comprehensive overview for every aspect of Entra Connect Sync. Look for the Microsoft.UserSignIn.SignOnMethod:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhl2mg9590lezcefl40d9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhl2mg9590lezcefl40d9.png" alt="PTA" width="800" height="870"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Check it in Entra portal:&lt;/p&gt;

&lt;p&gt;Entra ID » Microsoft Entra Connect » Connect Sync:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6qbr2e9zeu9rrrsx1rq7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6qbr2e9zeu9rrrsx1rq7.png" alt="Connect Sync" width="800" height="538"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can see it is Enabled.&lt;/p&gt;

&lt;p&gt;Click on the Pass-through authentication to check the status.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5iwgnn3zxusrw4f08w1k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5iwgnn3zxusrw4f08w1k.png" alt="Status" width="800" height="345"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The recommendation emphasise the importance of having multiple (at least 3) authentication agent for high availability.&lt;/p&gt;

&lt;p&gt;This is the end of this lab and overview of the different authentication options. &lt;br&gt;
Still there are a lot to discuss.&lt;br&gt;
In the next session we will discuss and enable SSO.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Deploying and Configuring a Hybrid Identity Lab Using Bicep - Part 1: Active Directory Setup and Sync</title>
      <dc:creator>Merényi Mónika</dc:creator>
      <pubDate>Wed, 15 Jan 2025 15:29:56 +0000</pubDate>
      <link>https://dev.to/neontiger12/deploying-and-configuring-a-hybrid-identity-lab-using-bicep-part-1-active-directory-setup-and-2eo7</link>
      <guid>https://dev.to/neontiger12/deploying-and-configuring-a-hybrid-identity-lab-using-bicep-part-1-active-directory-setup-and-2eo7</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Setting up a hybrid identity lab is a fantastic way to dive into the world of modern identity and access management. Since there's so much to cover in this exciting field, it’s best to break it down into smaller, bite-sized chunks. That way, you can tackle each piece one at a time and have fun while building your skills without feeling overwhelmed!&lt;/p&gt;




&lt;h2&gt;
  
  
  Part 1: Configuring Active Directory and Entra Connect Sync
&lt;/h2&gt;

&lt;p&gt;In this first part, we’ll set up on-premises Active Directory (AD) and configure Entra Connect (formerly AAD Connect) to sync user identities with Entra ID. This critical step enables hybrid identity, allowing seamless access to on-premises and cloud resources with a single identity.&lt;/p&gt;

&lt;p&gt;Objectives of Part 1:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Set up an On-Premises Active Directory Domain Services (AD DS) environment.&lt;/li&gt;
&lt;li&gt;Install and configure Microsoft Entra Connect Sync.&lt;/li&gt;
&lt;li&gt;Sync users from on-premises AD to Entra ID.&lt;/li&gt;
&lt;li&gt;Verify the sync between on-premises AD and Entra ID.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;We’ll cover:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Deploying resources using a Bicep template.&lt;/li&gt;
&lt;li&gt;Syncing on-prem users to Entra ID with Entra Connect.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By the end of this lab, you’ll have a functional hybrid identity setup to experiment with.&lt;/p&gt;




&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;Before starting, ensure you have:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Azure Subscription:&lt;/strong&gt; Active and with P1 license.&lt;br&gt;
You can do this lab practice with Free subscription as well, just with limitations. Free license does not allow you to create custom domain for example.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Setup custom domain in your tenant&lt;/strong&gt;: &lt;br&gt;
&lt;a href="https://learn.microsoft.com/en-us/entra/fundamentals/add-custom-domain" rel="noopener noreferrer"&gt;https://learn.microsoft.com/en-us/entra/fundamentals/add-custom-domain&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cloud user with Global Admin rights&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Get the Bicep files from here:&lt;/strong&gt; &lt;a href="https://dev.tourl"&gt;https://github.com/neontiger12/EntraConnect&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Install Visual Studio Code:&lt;/strong&gt; use VS Code to modify the bicep files. &lt;/p&gt;




&lt;h2&gt;
  
  
  Lab setup
&lt;/h2&gt;

&lt;p&gt;All the resources will be deployed in the West Europe region. &lt;/p&gt;

&lt;p&gt;The virtual network details:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;VNet Name:&lt;/strong&gt; VirtualNetwork01&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;IP Address Space for VNet:&lt;/strong&gt; 10.1.0.0/16&lt;/li&gt;
&lt;li&gt;**Subnet Name: **Subnet01&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Subnet IP Address Range:&lt;/strong&gt; 10.1.1.0/24&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Domain Controller - Server&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Virtual machine name:&lt;/strong&gt; DC1&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Static private address:&lt;/strong&gt; 10.1.1.5&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  What is Bicep and Why Use It?
&lt;/h2&gt;

&lt;p&gt;Bicep is a domain-specific language (DSL) for deploying Azure resources. It simplifies the process of defining infrastructure as code (IaC), making templates easier to read, write, and maintain compared to traditional JSON ARM templates.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Here’s why we’re using Bicep in this lab:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;It allows for declarative infrastructure:&lt;/strong&gt; You specify &lt;em&gt;what&lt;/em&gt; you want, and Azure takes care about the &lt;em&gt;how&lt;/em&gt; to do it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It provides a modular approach:&lt;/strong&gt; Resources like the VNet and server can be managed independently.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It’s easier to write and manage:&lt;/strong&gt; Bicep is more human-readable, which reduces errors and accelerates deployment.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For those new to Bicep, stay tuned! I’ll explain the templates step-by-step in a future post to help you build and customize your own deployments.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A quick run through the files:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The configurations for the client and server are split into separate modules to make the Bicep file more organized and readable:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Network Module:&lt;/strong&gt; Manages networking resources like the VNet and subnets.&lt;br&gt;
&lt;strong&gt;Server Module:&lt;/strong&gt; Handles server settings like VM size, OS, and network interfaces.&lt;br&gt;
This modular approach improves readability, reusability, and simplifies management.&lt;/p&gt;

&lt;p&gt;The main Bicep file acts as the central point that ties everything together. It references the network and server modules, passing in the required parameters and ensuring all resources are deployed in a coordinated way. This keeps the structure clean and easy to maintain.&lt;/p&gt;




&lt;h2&gt;
  
  
  1 - Setup the environment for the Bicep template
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Install Azure CLI: &lt;a href="https://learn.microsoft.com/en-us/cli/azure/install-azure-cli" rel="noopener noreferrer"&gt;https://learn.microsoft.com/en-us/cli/azure/install-azure-cli&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Login to your Azure account:&lt;br&gt;
&lt;em&gt;az login&lt;/em&gt;&lt;br&gt;
&lt;a href="https://learn.microsoft.com/en-us/cli/azure/authenticate-azure-cli-interactively" rel="noopener noreferrer"&gt;https://learn.microsoft.com/en-us/cli/azure/authenticate-azure-cli-interactively&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Install the bicep extension in Visual Studio Code (if you would like to modify the Bicep files)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We are using the terminal of the VS Code for easier access. Make sure you are running the commands from the directory where you store the bicep files.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  2 - Deploying the Virtual Network
&lt;/h2&gt;

&lt;p&gt;This guide explains how to deploy a Windows Server hosting Active Directory Domain Services (AD DS) using Bicep. We'll separate the deployment into two resource groups:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Resource Group for the Virtual Network (VNet): Shared between the server and client.&lt;/li&gt;
&lt;li&gt;Resource Group for the Server: Hosts the Windows Server for AD DS.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The first step is to deploy the VNet, which will connect the AD server and the client machine. &lt;/p&gt;

&lt;p&gt;We need to create a separate resource group for this.&lt;br&gt;
For example the name of the vnet is "Vnet", the location is Westeurope.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;az group create --name Vnet --location westeurope&lt;/em&gt;  &lt;/p&gt;

&lt;p&gt;Check the deployment result.You should see 'Succeeded'.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F132l57vhbn1hj2mvnu5f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F132l57vhbn1hj2mvnu5f.png" alt="Deployment result" width="800" height="201"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, we are deploying the Vnet resource:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;az deployment group create --resource-group VNet --template-file vnet.bicep&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;After the deployment check the provisioning state, it should be "Succeeded"&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgpmr0xu00a1o7ngbruvx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgpmr0xu00a1o7ngbruvx.png" alt="Provisioning state" width="800" height="667"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now that the network is set up, we’re ready to deploy the Domain Controller (DC)!&lt;/p&gt;




&lt;h2&gt;
  
  
  3 - Deploy the Server for the Domain Controller
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Create the resource group first:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;az group create --name DC_RG --location westeurope&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;After the successfully creating the resource group lets deploy the server!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;az deployment group create --resource-group DC_RG --template-file main-server.bicep&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;You will be asked to provide the admin username and password:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbdt32gq10zifhr62nlmy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbdt32gq10zifhr62nlmy.png" alt="Username and Password" width="800" height="49"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After a couple of minutes the deployment should be ready.&lt;/p&gt;

&lt;p&gt;provisioningState": "Succeeded"&lt;/p&gt;

&lt;p&gt;Go to the Azure portal check the VM you just created and click Connect:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flkogwt1ql5kuekmke4te.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flkogwt1ql5kuekmke4te.png" alt="Connect option" width="800" height="393"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Download the RDP file and open it to remotely connect.&lt;/p&gt;

&lt;p&gt;Since we enabled port 3389 you should not face any issue connecting.&lt;/p&gt;

&lt;p&gt;We are ready to setup the Domain Controller and the DNS service on the server.&lt;/p&gt;




&lt;h2&gt;
  
  
  4 - Configure the DC and DNS service
&lt;/h2&gt;

&lt;p&gt;Open the ADDS.ps1 with PowerShell ISE and Replace placeholder values yourdomain.local, yourdomain, and P@ssw0rd! representing your environment:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd44sgkdg1nmde5ednw01.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd44sgkdg1nmde5ednw01.png" alt="Customize the PS script" width="800" height="225"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Run the script. The server will restart once the installation finishes.&lt;/p&gt;

&lt;p&gt;Reconnect and check the Server Manager. You should see the ADDS and the DNS configured.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd4x10wqqlbhk00l4j0x9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd4x10wqqlbhk00l4j0x9.png" alt="ADDS and DNS configured" width="800" height="574"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now it is time to create users!&lt;/p&gt;

&lt;p&gt;Modify the placeholders for user prefix, domain and password to match your environment.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5d9k94rvwjy940zztt3f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5d9k94rvwjy940zztt3f.png" alt="Customize user creation" width="800" height="313"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After running the script check the created new users:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1zr870wkg3ua2ruedtmp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1zr870wkg3ua2ruedtmp.png" alt="Created users" width="800" height="490"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you check the domain you see that we used a non-routable domain: neontiger.local for this example. This is good for internal use, however we need to ensure we can synchronise our newly created users to Entra ID. &lt;/p&gt;

&lt;p&gt;For synchronisation, Entra ID requires that at least one domain is routable and verified in your Azure tenant.&lt;/p&gt;

&lt;p&gt;Entra ID uses User Principal Names (UPNs) to identify users.&lt;br&gt;
If your UPN suffix is @neontiger.local, Entra ID will not accept it because it's non-routable.&lt;/p&gt;

&lt;p&gt;A routable, verified domain (like neontiger12.com in this example) is required for UPNs to sync properly with Entra ID.&lt;/p&gt;

&lt;p&gt;Add your custom domain name to Active Directory Domains and Trust:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;right click on Active Directory Domains and Trust and click Properties&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4xqzz5ieo6l5970zbxyb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4xqzz5ieo6l5970zbxyb.png" alt="Add alternative UPN domain" width="800" height="656"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Don't forget to click Apply and then OK.&lt;/p&gt;

&lt;p&gt;If you check your user's property again you should see the new domain  available:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyv2g8vieu2ci4h0mq9xc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyv2g8vieu2ci4h0mq9xc.png" alt="Newly added domain is available" width="800" height="481"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's fix the UPN for the users!&lt;/p&gt;

&lt;p&gt;Microsoft's IdFix tool helps you to prepare your AD for the synchronisation. It identifies and fix issues, like the non-routable UPNs.&lt;br&gt;
Download and install the tool.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;IDfix&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://github.com/microsoft/idfix/tree/master/MSIs" rel="noopener noreferrer"&gt;https://github.com/microsoft/idfix/tree/master/MSIs&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Run the Query. &lt;br&gt;
The result will show the issue with the UPN:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvvaf18h3npn7rlp5joz3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvvaf18h3npn7rlp5joz3.png" alt="Query result" width="800" height="325"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Open the &lt;strong&gt;UPN_update.ps1&lt;/strong&gt; with PowerShell ISE and replace the relevant parameters to represent your current local and the new routable domain.&lt;br&gt;
Run the script to update the UPN of the users.&lt;/p&gt;

&lt;p&gt;Run the IdFix query again to confirm that the script has resolved the issue.&lt;br&gt;
Now the Cloudup users should disappeared from the list.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm23x87izkxh4ajdgbqls.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm23x87izkxh4ajdgbqls.png" alt="Query results - better" width="800" height="192"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There is one tiny problem left with my admin user: the DisplayName attribute is empty. Fix it by adding some value to that:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkbc59wzs5hi6kfe0m6uh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkbc59wzs5hi6kfe0m6uh.png" alt="Empty attribute" width="800" height="902"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Users are ready, now let's do the connect to Entra ID!&lt;/p&gt;




&lt;h2&gt;
  
  
  5 - Connect to Entra ID
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Fix the TLS 1.2&lt;/strong&gt;&lt;br&gt;
Entra ID Connect requires TLS 1.2. You can enable it on your server by running the following script (tls.ps1) from:&lt;br&gt;
&lt;a href="https://github.com/neontiger12/EntraConnect/tree/main/powershell-scripts" rel="noopener noreferrer"&gt;https://github.com/neontiger12/EntraConnect/tree/main/powershell-scripts&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Download and install the Entra Connect Sync:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.microsoft.com/en-us/download/details.aspx?id=47594" rel="noopener noreferrer"&gt;https://www.microsoft.com/en-us/download/details.aspx?id=47594&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Accept the terms and conditions and click Continue.&lt;/p&gt;

&lt;p&gt;Choose Customise, leave the next page as default and click Install.&lt;/p&gt;

&lt;p&gt;Choosing a Customized Entra Connect setup allows you to tailor synchronization options to your specific needs, such as filtering which organizational units (OUs) or attributes to sync, or enabling password writeback.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;User Sign-In&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The Sign On method is Password Hash Syncronization.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr925lcbgyb3ambpuqe76.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr925lcbgyb3ambpuqe76.png" alt="User Sign-In" width="800" height="534"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click Next.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Connect to Microsoft Entra ID&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Use your Global Admin user to connect.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzm61plupbr7w8t2q15w4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzm61plupbr7w8t2q15w4.png" alt="Entra ID" width="800" height="265"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You might face this issue with the sign-in:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe7z4ji9rvnfh9wupmv38.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe7z4ji9rvnfh9wupmv38.png" alt="Issue" width="800" height="707"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Add the required sites to the Trusted sites.&lt;/p&gt;

&lt;p&gt;Still after adding all of those site you can see this error message:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqps2829vv6i72e67rge8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqps2829vv6i72e67rge8.png" alt="Issue again" width="800" height="407"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To fix this open Internet Options from the Control Panel: Network and Internet » Internet Options. Lower the security level of the Trusted sites.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu3oyxls739hzusb2z26u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu3oyxls739hzusb2z26u.png" alt="Fixing this issue" width="800" height="1040"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note: Avoid simply searching for "Internet Options" to fix this issue, as you may encounter permission-related restrictions.&lt;/p&gt;

&lt;p&gt;Try to sign in again, this time it should work.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Connect your directories&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Click Add Directory and configure a new domain admin:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9ej1uy0sk1w2tplb5tax.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9ej1uy0sk1w2tplb5tax.png" alt="Add directory - new domain admin" width="800" height="635"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When it is ready, click Next.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv9ic5oa9he7l90n0rejm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv9ic5oa9he7l90n0rejm.png" alt="Directory" width="800" height="432"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Microsoft Entra Sign-in configuration &lt;br&gt;
*&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffc4b71ch74hmt432qwox.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffc4b71ch74hmt432qwox.png" alt="Sign-in" width="800" height="642"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Tick the box next to Continue without matching all UPN suffixes to verified domain.&lt;/p&gt;

&lt;p&gt;It's okay to continue setting up Entra Connect without matching all UPN suffixes to a verified domain, as the local domain in Active Directory will still function internally, and this setup is sufficient for our lab environment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Domain and OU filtering&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For this lab we sync all domains and OUs. Click Next.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Uniquely identify your users&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9j2cnhx9u6y1khxmqelg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9j2cnhx9u6y1khxmqelg.png" alt="Identify users" width="800" height="655"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Leave everything as default. We let Azure to use the mS-DS-Consistency GUID as a sourceAnchor.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;mS-DS-Conistency GUID&lt;/strong&gt; is an attribute that uniquely identifies a user both in Active Directory and in Entra. Often leveraged as the sourceAnchor. It ensures that even if a user changes their name, the attribute remains the same, preventing the creation of a new user in Entra ID; instead, it simply updates the user's details (e.g., last name)&lt;br&gt;
The &lt;strong&gt;sourceAnchor&lt;/strong&gt; (also called immutableId) is an attribute that uniquely identifies an object in both on-premises Active Directory and Microsoft Entra ID. It is a Base64 encoded representation of the mS-DS-Consistency GUID.&lt;/p&gt;

&lt;p&gt;Click Next.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Filter users and device&lt;/strong&gt;s&lt;/p&gt;

&lt;p&gt;Leave as default. Filtering is out of scope for this lab. &lt;br&gt;
Click Next.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Optional features&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Enable Password writeback as we will need this for the Self service password reset.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fajl0fq5la68fuv9abrvp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fajl0fq5la68fuv9abrvp.png" alt="Password writeback" width="800" height="660"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ready to configure&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fert2ph0qk8bud6p67ev5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fert2ph0qk8bud6p67ev5.png" alt="Configure" width="800" height="644"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Install.&lt;br&gt;
Configuring may take a while. Maybe it is time to grab a cup of coffee :).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9jj6jaqu5mdrxs64kvsl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9jj6jaqu5mdrxs64kvsl.png" alt="Ready" width="800" height="668"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once the setup is complete, you should see the 'Configuration Complete' window. The synchronisation started, wait a few minutes and check the newly added users in Entra ID.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqzz8l7xdbnfnlyxx419m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqzz8l7xdbnfnlyxx419m.png" alt="New users" width="392" height="354"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The On-premise sync enabled is set to yes for these users.&lt;br&gt;
If you check the properties for the user you can see all the attributes that were sync from AD. &lt;br&gt;
You cannot change these because from Entra's prospective the on-prem AD is the source of truth. &lt;/p&gt;

&lt;p&gt;The usage location is a good example for an attribute that you can set in Entra. This attribute can effect licensing options.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkvzxs8m45atlg5lh1c6z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkvzxs8m45atlg5lh1c6z.png" alt="Attributes" width="800" height="575"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Look at the On-premises immutable ID for CloudUser1:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmz456s0xr18wc83f7rxs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmz456s0xr18wc83f7rxs.png" alt="Immutable ID" width="800" height="440"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now check this attribute in the Active Directory Users and Computers.&lt;br&gt;
To see this option in properties we need to enable the advanced features:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Enable Advanced Features under the View menu.&lt;/li&gt;
&lt;li&gt;Right-click the user account and select Properties.&lt;/li&gt;
&lt;li&gt;Go to the Attribute Editor tab.&lt;/li&gt;
&lt;li&gt;Find mS-DS-ConsistencyGUID in the list of attributes.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fydhd1d4v5tbj81ifp2g6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fydhd1d4v5tbj81ifp2g6.png" alt="Properties" width="800" height="982"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You might face the same issue as me, the mS-DS-ConsistencyGUID attribute is empty.&lt;/p&gt;

&lt;p&gt;Let's fix that by initiating a sync cycle.&lt;/p&gt;

&lt;p&gt;There is a handy PowerShell command to do it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;First install the ADSyncTools:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Install-Module -Name ADSyncTools&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Reopen PowerShell ISE.&lt;/p&gt;

&lt;p&gt;Import the module:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Import-Module -Name ADSync&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Initiate a sync cycle:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Start-ADSyncSyncCycle -PolicyType Delta&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The result we expecting is "Success".&lt;/p&gt;

&lt;p&gt;Delta sync handels only changes made since the last sync to keep Entra ID updated efficiently. &lt;strong&gt;Initial sync&lt;/strong&gt;, on the other hand, is the first sync that brings in all objects from on-premises AD to Entra ID. Delta is faster and incremental, while Initial is comprehensive and sets the baseline.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkkfdpt7z8kfs9y2u61lb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkkfdpt7z8kfs9y2u61lb.png" alt="Sync Cyle" width="800" height="192"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, check the attribute again in Active Directory to see if it's populated.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7phaxte0f934nyfhqtnu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7phaxte0f934nyfhqtnu.png" alt="Populated value" width="800" height="980"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now it is there however you still not sure if they are the same?&lt;br&gt;
I can understand why you questioning that :).&lt;/p&gt;

&lt;p&gt;Open the convert.ps1 script in PowerShell ISE and edit the parameters according the values your user have. &lt;br&gt;
Now run the script and check the result.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7ywv5cxqafztiuz94x8b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7ywv5cxqafztiuz94x8b.png" alt="They are the same" width="800" height="78"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Remember, I mentioned in the Uniquely identify section of the Entra Connect setup: the On-premise immutable ID is the Base64 encoded representation of the mS-DS-ConsistencyGUID attribute.&lt;br&gt;
If you decode that you can confirm that those two values are the same! :)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Other way to check the sourceAnchor&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can also check these attributes with the Syncronization Service Manager.&lt;br&gt;
This tool allows you to monitor and manage syncronization, provides detailed logs and information about syncronization cycle. Great to have this for troubleshooting!&lt;/p&gt;

&lt;p&gt;Don't get overwhelmed by all those information you see.&lt;br&gt;
Explaining the details about how Entra Connect Sync works deserves a post of their own. &lt;br&gt;
For now it is enough if you understand that the Entra Connect consist of two &lt;strong&gt;Connector space:&lt;/strong&gt; one for your on-prem AD, and one for the Entra ID. &lt;/p&gt;

&lt;p&gt;The **connector space **holds a copy of each object and its attributes from a connected data source, helping Entra Connect track changes for proper synchronization.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;Metaverse&lt;/strong&gt; in Entra Connect is a central database that combines and stores information from all connected data sources, creating a unified view of objects for synchronization with Entra ID.&lt;/p&gt;

&lt;p&gt;With that in mind go to the Metaverse Search and click Search on the right hand side.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw96irx71z1ecmjn3ncyd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw96irx71z1ecmjn3ncyd.png" alt="Metaverse" width="800" height="435"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Right click on CloudUser 1 and click Properties.&lt;/p&gt;

&lt;p&gt;The attributes displayed are those relevant to the Metaverse for that specific user. The sourceAnchor (also known as Immutable ID) is used as the unique identifier in Entra ID, while the mS-DS-ConsistencyGUID serves as the unique identifier for the identity in Active Directory.&lt;/p&gt;

&lt;p&gt;To check the attributes applicable for the Active Directory go to the  Connectors tab and select the connector that is representing your AD. Click properties.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqrwlpw2nrihpb0xn0kjj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqrwlpw2nrihpb0xn0kjj.png" alt="Properties" width="800" height="551"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now you can see the mS-DS-ConsistencyGUID.&lt;br&gt;
Vigilant readers might discover that the mS-DS-ConsistencyGUID is the same as the objectGUID.&lt;/p&gt;

&lt;p&gt;This is because the &lt;strong&gt;mS-DS-ConsistencyGUID&lt;/strong&gt; is copied from the objectGUID when Entra Connect first replicates the user.&lt;br&gt;
The &lt;strong&gt;objectGUID&lt;/strong&gt; in Active Directory changes only if the object is deleted and then re-created or if it is moved to a different AD forest. To maintain the link between Active Directory and Entra ID, we use an immutable ID that consistently represents the identity, even if other attributes change.&lt;/p&gt;

&lt;p&gt;In the Syncronization Service Manager you can see the status of the import/export shown as "success".&lt;/p&gt;

&lt;p&gt;Feel free to explore the Service Manager a bit more if you have time—it’s a great tool for understanding the sync process.&lt;/p&gt;

&lt;p&gt;In the next part we will cover Entra Connect Health to further monitor our synchronization process.&lt;/p&gt;

&lt;h2&gt;
  
  
  Further study
&lt;/h2&gt;

&lt;p&gt;For a more in-depth understanding of Entra Connect, check out this YouTube video by John Savill's Technical Training: &lt;a href="https://www.youtube.com/watch?v=Ziw9MClUfkc" rel="noopener noreferrer"&gt;&lt;br&gt;
What is the link between Azure AD (AAD) and AD users?&lt;/a&gt;. It provides an excellent walkthrough and complements the concepts covered here.&lt;/p&gt;

</description>
      <category>azure</category>
      <category>identity</category>
      <category>bicep</category>
    </item>
  </channel>
</rss>
