Join our Newsletter — 33% off our NHI Course
Home› Guides› Entra ID Primary Refresh Token (PRT) Security Guide:…
Guide Identity & Access Management (IAM)

Entra ID Primary Refresh Token (PRT) Security Guide: Protecting the Device Sign-In Token

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, edited by Lalit Choda Updated 8 November 2026 12 min read
On this page

The Primary Refresh Token is the credential that makes Windows, macOS and mobile single sign-on to Microsoft Entra ID work, and whoever can use it from outside its device inherits the user's sessions, MFA claim and device compliance. A PRT is valid for 90 days and renewed while the device is used, so it is a long-lived, high-value target for token theft (MITRE ATT&CK T1528 Steal Application Access Token, reused as T1550.001 Application Access Token). This guide explains how the PRT is issued, bound and renewed, which admin roles and device settings decide its safety, what to log, and a hardening baseline built on TPM binding, Token Protection and device hygiene. It is for Entra, endpoint and detection engineers. It is defensive only: no token extraction methods are described. For the wider tenant, see the Entra ID Security Guide.

This is an independent guide from NHI Mgmt Group, based on Microsoft's public documentation as of November 2026. It is not sponsored or reviewed by Microsoft. Product features change, so confirm settings against Microsoft's current documentation.

Key takeaways

  • The PRT is a device credential as much as a user one. It is bound to keys created at device registration, and its safety depends on those keys being in a TPM, not in software.
  • It carries the MFA claim. A Windows Hello for Business sign-in gives the PRT an MFA claim that is refreshed at each renewal, so Conditional Access sees MFA without a new prompt.
  • Token Protection makes theft less useful. The Conditional Access session control accepts only device-bound sign-in session tokens for supported apps, so a token replayed from another device is refused.
  • Disabling the device is the fastest kill switch. Disabling a device in Entra ID revokes its PRT and refresh tokens and blocks Windows Hello for Business; revoking user sessions alone leaves current access tokens valid for up to an hour.
  • Device administrators are PRT administrators. Local admin on a device, Cloud Device Administrator and Intune Administrator decide who can reach or revoke PRTs; scope them like privileged roles.

How identity and access work for the PRT

Microsoft describes the PRT as an opaque artifact issued to Microsoft first-party token brokers to enable SSO on supported Windows, iOS, macOS, Android and Linux devices. Client components cannot read its contents.

Issuance and binding

  • Keys at registration: when a device registers, it generates a device key and a transport key. With a working TPM the private halves are bound to the TPM. Microsoft recommends TPM 2.0 for all registration scenarios on Windows 10 and later, and Entra ID does not use TPM 1.2 for these keys after Windows 10 version 1903.
  • Session key: when the PRT is issued, Entra ID returns a session key encrypted to the transport key. That key is the proof-of-possession key for later requests; Entra ID rejects requests not signed by it. A PRT is not issued if the device key signature cannot be validated.
  • Who issues it: on Entra joined and hybrid joined Windows the CloudAP plugin obtains the PRT during Windows sign-in; on Entra registered devices (a work account added to a personal device) the Web Account Manager (WAM) plugin is the authority.
  • Registered and unregistered PRTs: clients prefer a registered device PRT; only that type satisfies device registration policies. Unregistered device PRTs are bound to a client-generated key pair.

Lifetime and renewal

PropertyValue (Microsoft Learn)Security meaning
Validity90 days, continuously renewed while the device is usedLong-lived; theft gives durable access unless bound or revoked
Renewal by CloudAPEvery 4 hours during Windows sign-inRevocation takes effect at renewal; offline devices renew after reconnecting
Conditional Access at issuance and renewalNot evaluatedPolicies apply when the PRT is used to get app tokens, not when it is minted
MFA claim with Windows Hello for BusinessRefreshed on each renewalMFA persists as long as the PRT does
PartitioningSeparate PRT per credential (Windows Hello, password, smart card)MFA claims do not leak from one credential to another
Browser SSOEdge natively, Chrome with the Microsoft Single Sign On extension, Firefox 91 and later with a Windows SSO setting; not in private browsingThe browser presents a PRT-derived credential in the x-ms-RefreshTokenCredential header

What invalidates a PRT

  • The user is disabled or deleted (cached sign-in can still work until CloudAP learns of it).
  • The device is disabled or deleted in Entra ID.
  • A password change, for a password-based PRT.
  • A TPM failure, which makes the keys unusable and triggers re-registration.

Microsoft states that TPM-protected keys protect against actors trying to steal keys or replay the PRT. The corollary is the main risk: where keys are not hardware-bound, or where an adversary has administrative control of the signed-in device, the PRT and its session key are much easier to misuse. Defenders often call that replay "pass-the-PRT".

Admin roles and privileged access

Role or rightWhat it can do to PRTs and devicesControl
Local administrator on a deviceFull control of the signed-in user's session on that deviceRemove the registering user from local admin; use Windows LAPS; scope Microsoft Entra Joined Device Local Administrator
Microsoft Entra Joined Device Local AdministratorLocal admin on every Entra joined device, tenant-wideAssign to few, eligible through PIM
Cloud Device AdministratorChange device settings; enable, disable and delete devices; read BitLocker keysPrivileged role: PIM, phishing-resistant MFA, admin workstation
Intune AdministratorDisable and delete devices, manage enrolled devices, run scripts and wipesRBAC scope tags, multi-admin approval for destructive actions
Windows 365 AdministratorDelete devicesAssign only where Windows 365 is used
Users (default)Join devices (default All), register devices, up to 50 devices eachRestrict join to a group; require MFA via the Register or join devices user action

Device management roles are routinely treated as operational rather than privileged. Treat them as privileged: the same rights can wipe, disable or re-register devices at scale. See the Microsoft Intune Guide and the LAPS Guide.

Integrations, API tokens and service accounts

  • The device object is a non-human identity: each joined or registered device has its own Entra identity and keys. Stale devices that stay enabled keep a valid identity in the directory. Run a lifecycle process for devices like any other machine identity. See the Machine Identity, PKI and Certificate Lifecycle Guide.
  • Rogue device registration (T1098.005): an adversary with a user's credentials can register a device they control, obtain a registered device PRT and then satisfy device-based policies from it. Restricting who can join and register, requiring MFA for the Register or join devices user action, and requiring compliance (not just registration) close most of this.
  • App refresh tokens on the device: Microsoft notes that app refresh tokens are encrypted with DPAPI and, for SSO users, bound to the device through the session or device key; for non-SSO users they are not device-bound. Apps that keep their own tokens outside the broker do not get PRT protection.
  • Shared and kiosk devices: a shared device holds PRTs for every signed-in user; configure shared-device modes and sign-out so tokens do not accumulate.
  • Automation and service accounts: PRTs belong to users on devices. Automation should use workload identities (managed identities, service principals with certificates or federated credentials), not a user account signed into a server, which would give that server a long-lived PRT. See the Workload Identity Federation Guide.

Logging and detection

SignalSourceNotes
Possible attempt to access Primary Refresh Token (PRT), riskEventType attemptedPrtAccessEntra ID Protection, sourced from Microsoft Defender for EndpointOffline detection, raises the user to high risk; Microsoft recommends prompt remediation; only fires where Defender for Endpoint is deployed
Anomalous token, anomalousTokenEntra ID ProtectionUnusual token lifetime or replay from an unfamiliar location; covers session and refresh tokens; noisier at low and medium risk
Attacker in the Middle, attackerinTheMiddleEntra ID Protection with Defender for Cloud AppsSession linked to a malicious reverse proxy
Token Protection report-only resultsSign-in logs, interactive and non-interactiveShows which sign-ins would fail because tokens were not device-bound
Same user, device ID claimed from a new IP, ASN or country within hoursNon-interactive sign-in logsClassic replay pattern; correlate with endpoint telemetry for the device
Device registered or joined, device enabled after disable, device owner changedEntra audit log (Device category)Rogue registration and tampering
New assignments of Cloud Device Administrator, Intune Administrator or Joined Device Local AdministratorEntra audit log, PIMPrivilege over devices and PRTs

Send both interactive and non-interactive sign-in logs to the SIEM: most PRT use is non-interactive. Microsoft's own Token Protection rollout advice is to capture both log types and analyse them across a full cycle of normal application use. See the Entra ID Sign-In and Audit Log Detection Guide.

Hardening baseline

  1. TPM 2.0 everywhere: require it in procurement and device compliance, and find devices registered with software keys. Re-register them once hardware is fixed.
  2. Windows Hello for Business or another phishing-resistant method: it gives a hardware-backed credential and a PRT with an MFA claim, removing password-based PRTs from daily use. See the Windows Hello for Business Guide.
  3. Token Protection in Conditional Access: pilot in report-only for Exchange Online, SharePoint Online and Teams native apps (generally available on Windows, macOS and iOS), plus Azure Virtual Desktop and Windows 365 on Windows. Windows support covers Windows 10 and later joined, hybrid joined or registered devices and hybrid joined Windows Server 2019 and later. Browser support for Azure Resource Manager web apps is in preview.
  4. Require compliant devices, not just registered ones, for sensitive apps and all admin portals, so a newly registered rogue device does not pass.
  5. Restrict device join and registration: set Users may join devices to a group, use the Register or join devices user action with MFA (and set the legacy per-tenant MFA setting to No when you do), and lower the maximum number of devices per user from 50.
  6. Remove standing local admin: stop adding the registering user as local administrator, use Entra or Windows LAPS for the built-in account, and keep the Joined Device Local Administrator role minimal.
  7. Sign-in frequency for high-risk access: the session control forces re-authentication regardless of PRT lifetime; apply it to admin portals and privileged roles.
  8. Endpoint protection that sees token access: the PRT access risk detection depends on Defender for Endpoint or an equivalent EDR signal; without it you have no host-side view.
  9. Device lifecycle: disable stale devices after a defined period of inactivity and delete later, wiping or retiring managed devices first.

Rollout and rollback for Token Protection

  1. Inventory platforms and app versions; unsupported clients will fail when enforced.
  2. Create the policy in report-only for a pilot group, targeting the supported resources only.
  3. Review interactive and non-interactive sign-ins for would-fail results; fix or exclude client types.
  4. Enforce for the pilot, then IT and admins, then wider groups.
  5. Roll back by switching the policy to report-only; keep a documented exclusion group with an owner and review date.

Responding to suspected PRT theft

  1. Disable the device in Entra ID (Cloud Device Administrator or Intune Administrator): this revokes its PRT and refresh tokens and blocks Windows Hello for Business on it.
  2. Revoke the user's sessions with Revoke sessions in the portal or Revoke-MgUserSignInSession, and reset the password if a password-based PRT may be involved. Existing access tokens can stay valid for up to an hour, except in CAE-capable apps.
  3. Isolate and investigate the endpoint: PRT misuse usually means the device was compromised; rebuild rather than clean.
  4. Review what the token reached: mailbox rules, OAuth consents, new MFA methods, new device registrations. See the OAuth Token Theft Incident Playbook.

Common misconfigurations

  • Device-based policies that accept registration as trust: "require registered device" is satisfied by any device a user can register; use compliance or hybrid join requirements.
  • Everyone may join devices, and every joiner is local admin: the default combination gives any user admin rights over a device that holds their PRT and can be registered at will.
  • Software-key registrations left in place: devices registered before TPM fixes or on virtual machines without vTPM keep weaker binding indefinitely.
  • Revoking sessions but not the device: on a compromised endpoint the device is the problem; user revocation alone lets the device obtain new tokens once the user signs in again.
  • No non-interactive log ingestion: replayed tokens appear mainly as non-interactive sign-ins, which are often not exported because of volume.
  • Device roles outside PIM: Cloud Device Administrator and Intune Administrator held permanently by large operations teams.

Framework mapping

FrameworkReference
MITRE ATT&CK v20T1528 Steal Application Access Token; T1550.001 Application Access Token; T1539 Steal Web Session Cookie; T1098.005 Device Registration
NIST SP 800-53 Rev. 5IA-3 Device Identification and Authentication; SC-23 Session Authenticity; AC-12 Session Termination; AC-6 Least Privilege; SI-4 System Monitoring
NIST CSF 2.0PR.AA-01; PR.AA-04 identity assertions protected; PR.AA-05; DE.CM-01
CIS Controls v8.1Control 1 Inventory of Enterprise Assets; Control 5 Account Management; Control 6 Access Control Management

Practitioner checklist

  • Report devices without TPM 2.0-backed registration and plan their re-registration or replacement.
  • Deploy Windows Hello for Business or another phishing-resistant method so password-based PRTs fall out of daily use.
  • Run Token Protection in report-only, then enforce for supported apps, admins first.
  • Require compliant devices for admin portals and sensitive apps.
  • Restrict device join to a group, require MFA for Register or join devices, and lower the per-user device limit.
  • Stop making the registering user a local admin and manage local admin passwords with LAPS.
  • Put Cloud Device Administrator, Intune Administrator and Joined Device Local Administrator behind PIM.
  • Ingest non-interactive sign-ins and alert on attemptedPrtAccess and anomalousToken detections.
  • Document the PRT theft response: disable device, revoke sessions, isolate endpoint, review reach.

Standards and references

Related NHI Mgmt Group resources: Entra ID Security Guide · Conditional Access Guide · Session Hijacking and Cookie Theft Guide · AiTM Phishing Guide · Entra ID Cross-Tenant Access and B2B Guest Governance Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 8 November 2026. Spotted an error? Use our contact page.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick the PDF box to continue.