Primary Refresh Token

Overview#

Primary Refresh Token (PRT) is a key artifact of Microsoft Azure AD authentication on Windows 10, Windows Server 2016 and later versions, IOS, and Android devices.

Primary Refresh Token is a JSON Web Token (JWT) specially issued to Microsoft first party token brokers to enable Single Sign-On (SSO) across the applications used on those devices.

Primary Refresh Token contains claims generally contained in any Azure AD Refresh Token and some device-specific claims as follows:

How is a Primary Refresh Token issued?#

Device registration is a prerequisite for device based authentication in Azure AD. A PRT is issued to users only on registered devices. For more in-depth details on device registration, see the article Windows Hello for Business and Device Registration. During device registration, the dsreg component generates two sets of cryptographic key pairs: The Private Keys are bound to the device’s TPM if the device has a valid and functioning TPM, while the Public Keys are sent to Azure AD during the device registration process and are used to validate the device state during PRT requests.

The PRT is issued during user authentication on a Windows 10 device in two scenarios:

In Azure AD registered device scenarios, the Azure AD WAM plugin is the primary authority for the PRT since Windows logon is not happening with this Azure AD account.

Note#

Third-party Identity Providers need to support the WS-Trust protocol to enable PRT issuance on Windows 10 devices. Without WS-Trust, PRT cannot be issued to users on Hybrid Azure AD joined or Azure AD joined devices. On ADFS only username mixed endpoints are required. Both adfs/services/trust/2005/windowstransport and adfs/services/trust/13/windowstransport should be enabled as intranet facing endpoints only and MUST NOT be exposed as Extranet facing endpoints through the Web Application Proxy

What is the lifetime of a PRT?#

Once issued, a PRT is valid for 14 days and is continuously renewed as long as the user actively uses the device.

Keep in Mind#

A Primary Refresh Token is only issued and renewed during Native application authentication. A Primary Refresh Token is not renewed or issued during a browser session.

In Azure AD joined and hybrid Azure AD joined devices, the CloudAP plugin is the primary authority for a PRT. If a PRT is renewed during a WAM-based token request, the PRT is sent back to CloudAP plugin, which verifies the validity of the PRT with Azure AD before accepting it.

More Information#

There might be more information for this subject on one of the following: