The identity goal for my lab was easy to say and took weeks to finish: one account per person, kept in on-prem Active Directory, and one sign-in. A user signs in to a domain workstation and reaches Microsoft’s cloud apps without typing a password again. This post connects the pieces that make that work and shows the test that proved it.

Why one sign-in matters

Every extra password prompt trains people to type their password whenever a sign-in page appears. A phishing page that looks like Microsoft’s gets the same reflex. With single sign-on, a prompt becomes unusual, so people are more likely to stop and wonder why it’s there.

One identity also means one place to manage it. The cloud account is a synced copy of the AD account, so changes like disabling a user start in AD and flow to Entra ID on the next sync, instead of depending on someone remembering a second console.

The chain

Five pieces have to work, in order. Most of them were earlier posts:

Piece What it does Covered in
AD user account The source of truth: password, group membership, enabled or disabled Standing up a domain controller
Cloud Sync with password hash sync Copies the user to Entra ID, along with a hash of the password hash, so the same password works in the cloud [1] Syncing AD to Entra ID with Cloud Sync
Hybrid join Gives the workstation an identity in Entra ID as well as in AD Getting Windows 11 Pro security events into Sentinel
Primary Refresh Token (PRT) A token Windows gets at sign-in and uses to sign the user in to cloud apps [2] This post
Microsoft Edge Passes the PRT to Microsoft sign-in pages, so they don’t prompt [3] This post

The user account also needs a UPN on the verified public domain. A .local UPN syncs with an onmicrosoft.com address instead, and the user can’t sign in to the cloud with the name they use on-prem.

Where the token comes from

When a user signs in to a hybrid-joined Windows device, the Microsoft Entra CloudAP plugin takes the credentials they typed, requests a PRT from Entra ID, and caches it. After that, the WAM plugin uses the PRT to get tokens for apps and adds it to browser requests, which is what gives Edge single sign-on without an extension [2].

The PRT is tied to the device it was issued to. On Windows, the secret that binds it is stored in the TPM [4], and Windows refreshes the PRT in the background every four hours [5]. It also carries the device and user claims that Conditional Access evaluates [2]. My tenant is on the free tier, so there’s no Conditional Access here yet, but this token is what a device-based policy would check.

The test

I signed in to the workstation as a synced test user. That was a normal domain user, not an admin account. Admin accounts don’t belong on workstations, and a normal user is the experience I wanted to test anyway.

First, the device needs a PRT for that user. Run this and look at the SSO State section [6]:

dsregcmd /status

The line that matters:

AzureAdPrt : YES

Second, open Edge and go to https://myapps.microsoft.com. The apps dashboard opened, signed in as the test user, with no password prompt. That’s the whole chain working: the account came from AD, Cloud Sync put it in Entra ID with the same password, the hybrid-joined device got a PRT at Windows sign-in, and Edge used it.

If you try this yourself, don’t use a private window. Browser SSO doesn’t apply in InPrivate mode [2], so you’d get a prompt and think something was broken.

Most of the work was fixing things

The test took a few minutes. Getting to it took a .local UPN that synced with the wrong address, three wrong clocks that broke hybrid join, and a sync scope that pointed at a group after the group had moved. Each of those is in the earlier posts, along with how I found it.

References

  1. What is password hash synchronization with Microsoft Entra ID?
  2. Understanding Primary Refresh Token (PRT)
  3. Microsoft Edge identity support and configuration
  4. Protecting tokens in Microsoft Entra
  5. Troubleshoot primary refresh token issues on Windows devices
  6. Troubleshoot devices by using the dsregcmd command

Comment section

Sorry babes, you have to sign into Github to comment. Feel free to let me know what's on your mind!