Skip to content

Commit 41dbe2e

Browse files
Incorporated Jerry's feedback.
1 parent 7c7f220 commit 41dbe2e

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

articles/active-directory/devices/troubleshoot-primary-refresh-token.md

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services: active-directory
66
ms.service: active-directory
77
ms.subservice: devices
88
ms.topic: troubleshooting
9-
ms.date: 7/26/2023
9+
ms.date: 8/1/2023
1010

1111
ms.author: gudlapreethi
1212
author: GudlaPreethi
@@ -15,23 +15,23 @@ ms.reviewer: gudlapreethi, bemey, filuz, robgarcia, v-leedennis
1515
---
1616
# Troubleshoot primary refresh token issues on Windows devices
1717

18-
This article discusses how to troubleshoot issues that involve the [primary refresh token](/azure/active-directory/devices/concept-primary-refresh-token) (PRT) when you authenticate onto a Microsoft Azure Active Directory (Azure AD)-joined Windows device by using your Azure AD credentials.
18+
This article discusses how to troubleshoot issues that involve the [primary refresh token](/azure/active-directory/devices/concept-primary-refresh-token) (PRT) when you authenticate on a Microsoft Azure Active Directory (Azure AD)-joined Windows device by using your Azure AD credentials.
1919

20-
On devices that are joined to Microsoft Azure Active Directory (Azure AD) or joined to hybrid Azure AD, the main artifact of authentication is the PRT. You obtain this token by signing in to Windows 10 by using Azure AD credentials on an Azure AD-joined device for the first time. The PRT is cached on that device. For subsequent sign-ins, the cached token is used to let you use the desktop.
20+
On devices that are joined to Azure AD or hybrid Azure AD, the main component of authentication is the PRT. You obtain this token by signing in to Windows 10 by using Azure AD credentials on an Azure AD-joined device for the first time. The PRT is cached on that device. For subsequent sign-ins, the cached token is used to let you use the desktop.
2121

22-
Once every four hours, as part of locking and unlocking the device or signing in again to Windows, a background network authentication is tried to refresh the PRT. If there are problems in refreshing the token, the PRT eventually expires. Expiration affects single sign-on (SSO) to Azure AD resources. It also causes sign-in prompts to be shown.
22+
As part of the process of locking and unlocking the device or signing in again to Windows, a background network authentication attempt is made one time every four hours to refresh the PRT. If problems occur that prevent refreshing the token, the PRT eventually expires. Expiration affects single sign-on (SSO) to Azure AD resources. It also causes sign-in prompts to be shown.
2323

24-
If you suspect that there's a PRT problem, first collect Azure AD logs and follow the steps outlined in the troubleshooting checklist. We recommend that you collect Azure AD logs for any Azure AD client issue first, ideally within a repro session. Complete this process before you contact the PG or file an ICM.
24+
If you suspect that a PRT problem exists, we recommend that you first collect Azure AD logs, and follow the steps that are outlined in the troubleshooting checklist. Do this for any Azure AD client issue first, ideally within a repro session. Complete this process before you file a support request.
2525

2626
## Troubleshooting checklist
2727

2828
### Step 1: Get the status of the primary refresh token
2929

3030
1. Sign in to Windows under the user account in which you experience PRT issues.
3131

32-
1. On the Windows **Start** menu, search for and select **Command Prompt**.
32+
1. Select **Start**, and then search for and select **Command Prompt**.
3333

34-
1. Enter `dsregcmd /status` to run the device registration command ([dsregcmd](./troubleshoot-device-dsregcmd.md)).
34+
1. To run the device registration command ([dsregcmd](./troubleshoot-device-dsregcmd.md)), enter `dsregcmd /status`.
3535

3636
1. Locate the [SSO state](./troubleshoot-device-dsregcmd.md#sso-state) section of the device registration command's output. The following text shows an example of this section:
3737

@@ -52,20 +52,20 @@ If you suspect that there's a PRT problem, first collect Azure AD logs and follo
5252
+----------------------------------------------------------------------+
5353
```
5454

55-
1. Check the value of the `AzureAdPrt` field. If it's set to `NO`, there was an error acquiring the PRT status from Azure AD.
55+
1. Check the value of the `AzureAdPrt` field. If it's set to `NO`, an error occurred when you tried to acquire the PRT status from Azure AD.
5656

57-
1. Check the value of the `AzureAdPrtUpdateTime` field. If the value of the `AzureAdPrtUpdateTime` field is more than four hours, there's probably an issue that's preventing the PRT from refreshing. Lock and unlock the device to force PRT refresh, and then check whether the time is updated.
57+
1. Check the value of the `AzureAdPrtUpdateTime` field. If the value of the `AzureAdPrtUpdateTime` field is more than four hours, a problem is likely preventing the PRT from refreshing. Lock and unlock the device to force a PRT refresh, and then check whether the time is updated.
5858

5959
### Step 2: Get the error code
6060

61-
The next step is to get the error code that causes the PRT error. The quickest way to get the PRT error code is to examine the device registration command output. However, this method requires Windows 10 May 2021 update (version 21H1) or a later version. The other method is to find the error code in Azure AD analytic and operational logs.
61+
The next step is to get the error code that causes the PRT error. The quickest way to get the PRT error code is to examine the device registration command output. However, this method requires the Windows 10 May 2021 update (version 21H1) or a later version. The other method is to find the error code in Azure AD analytic and operational logs.
6262

6363
#### Method 1: Examine the device registration command output
6464

6565
> [!NOTE]
66-
> This method is available only if you're using Windows 10 May 2021 update (version 21H1) or a later version of Windows.
66+
> This method is available only if you're using the Windows 10 May 2021 update (version 21H1) or a later version of Windows.
6767
68-
To get the PRT error code, run the `dsregcmd` command, and then locate the `SSO State` section. Under the `AzureAdPrt` field, the `Attempt Status` field contains the error code. In the following example, the error code is `0xc000006d`.
68+
To get the PRT error code, run the `dsregcmd` command, and then locate the `SSO State` section. In the `AzureAdPrt` field, the `Attempt Status` field contains the error code. In the following example, the error code is `0xc000006d`.
6969

7070
```output
7171
AzureAdPrt : NO
@@ -84,19 +84,19 @@ To get the PRT error code, run the `dsregcmd` command, and then locate the `SSO
8484
Server Error Description : AADSTS50126: Error validating credentials due to invalid username or password.
8585
```
8686

87-
#### Method 2: Use the Event Viewer to examine Azure AD analytic and operational logs
87+
#### Method 2: Use Event Viewer to examine Azure AD analytic and operational logs
8888

89-
1. On the Windows **Start** menu, search for and select **Event Viewer**.
90-
1. In the **Event Viewer** window, if the console tree isn't showing, select the **Show/Hide Console Tree** icon to make the console tree visible.
91-
1. In the console tree, select **Event Viewer (Local)**. If there aren't child nodes showing underneath that item, double-click your selection to show them.
92-
1. Select the **View** menu. If there isn't a check mark next to **Show Analytic and Debug Logs**, select that menu item to enable that feature.
93-
1. In the console tree, expand **Applications and Services Logs**. Expand **Microsoft**. Expand **Windows**. Expand **AAD**. The **Operational** and **Analytic** child nodes appear.
89+
1. Select **Start**, and then search for and select **Event Viewer**.
90+
1. If the console tree doesn't appear in the **Event Viewer** window, select the **Show/Hide Console Tree** icon to make the console tree visible.
91+
1. In the console tree, select **Event Viewer (Local)**. If child nodes don't appear underneath this item, double-click your selection to show them.
92+
1. Select the **View** menu. If a check mark isn't displayed next to **Show Analytic and Debug Logs**, select that menu item to enable that feature.
93+
1. In the console tree, expand **Applications and Services Logs** > **Microsoft** > **Windows** > **AAD**. The **Operational** and **Analytic** child nodes appear.
9494

9595
> [!NOTE]
96-
> In the Azure AD Cloud Authentication Provider (CloudAP) plug-in, **Error** events are written to the **Operational** event logs, and information events are written to the **Analytic** event logs. You need to examine both the **Operational** and **Analytic** event logs to troubleshoot PRT issues.
96+
> In the Azure AD Cloud Authentication Provider (CloudAP) plug-in, **Error** events are written to the **Operational** event logs, and information events are written to the **Analytic** event logs. You have to examine both the **Operational** and **Analytic** event logs to troubleshoot PRT issues.
9797
9898
1. In the console tree, select the **Analytic** node to view Azure AD-related analytic events.
99-
1. In the list of analytic events, search for Event ID 1006 and 1007. Event ID 1006 denotes the beginning of the PRT acquisition flow, and Event ID 1007 denotes the end of the PRT acquisition flow. All events in the **AAD** logs (both **Analytic** and **Operational**) that occurred between when Event ID 1006 and Event ID 1007 occurred are logged as part of the PRT acquisition flow. The following table shows an example event listing.
99+
1. In the list of analytic events, search for Event IDs 1006 and 1007. Event ID 1006 denotes the beginning of the PRT acquisition flow, and Event ID 1007 denotes the end of the PRT acquisition flow. All events in the **AAD** logs (both **Analytic** and **Operational**) that occurred between Event ID 1006 and Event ID 1007 are logged as part of the PRT acquisition flow. The following table shows an example event listing.
100100

101101
| Level | Date and Time | Source | Event ID | Task Category |
102102
|-----------------|--------------------------|---------|----------|--------------------------------|
@@ -111,8 +111,8 @@ To get the PRT error code, run the `dsregcmd` command, and then locate the `SSO
111111
| Information | 6/24/2020 3:35:35 AM | AAD | 1157 | AadCloudAPPlugin Operation |
112112
| Information | 6/24/2020 3:35:35 AM | AAD | 1158 | AadCloudAPPlugin Operation |
113113

114-
1. Double-click the row that has Event ID 1007. The **Event Properties** dialog box for this event appears.
115-
1. In the **General** tab's description box, copy the error code. The error code is a 10-character string that begins with `0x`, followed by an 8-digit hexadecimal number.
114+
1. Double-click the row that contains Event ID 1007. The **Event Properties** dialog box for this event appears.
115+
1. In the description box on the **General** tab, copy the error code. The error code is a 10-character string that begins with `0x`, followed by an 8-digit hexadecimal number.
116116

117117
### Step 3: Get troubleshooting instructions for certain error codes
118118

@@ -405,17 +405,17 @@ Common general network-related issues.
405405
406406
#### Regular logs
407407
408-
1. Download the [Auth script archive](https://aka.ms/authscripts) and extract the scripts onto a local directory. If necessary, review the usage instructions in [KB4487175](https://aka.ms/howto-authscripts).
409-
1. Open an administrative PowerShell session, and then change the current directory to the directory in which you saved the Auth scripts.
410-
1. Enter the following command to begin the error tracing:
408+
1. Download the [Auth script archive](https://aka.ms/authscripts), and extract the scripts into a local directory. If it's necessary, review the usage instructions in [KB 4487175](https://aka.ms/howto-authscripts).
409+
1. Open an administrative PowerShell session, and change the current directory to the directory in which you saved the Auth scripts.
410+
1. To begin the error tracing, enter the following command:
411411
412412
```powershell
413413
.\Start-auth.ps1 -v -acceptEULA
414414
```
415415

416416
1. Switch the Windows user account to go to your problem user's session.
417417
1. Lock the device.
418-
1. If the device is a hybrid Azure AD-joined device, wait at least 60 seconds to let the PRT acquisition task complete.
418+
1. If the device is a hybrid Azure AD-joined device, wait at least 60 seconds to let the PRT acquisition task finish.
419419
1. Unlock the device.
420420
1. Switch the Windows user account back to your administrative session that's running the tracing.
421421
1. After you reproduce the issue, run the following command to end the tracing:
@@ -433,8 +433,8 @@ The following procedure describes how to capture traces by using the [Time Trave
433433
> [!WARNING]
434434
> Time travel traces contain personal data. In addition, Local Security Authority Subsystem Service (LSASS or *lsass.exe*) traces contain extremely sensitive information. When you handle these traces, make sure that you use best practices for the storage and sharing of this type of information.
435435
436-
1. On the Windows **Start** menu, search for **Command Prompt**, and then select **Run as administrator**.
437-
1. In the command prompt console, create a temporary directory:
436+
1. Select **Start**, enter *cmd*, locate and right-click **Command Prompt** in the search results, and then select **Run as administrator**.
437+
1. At the command prompt, create a temporary directory:
438438

439439
```cmd
440440
mkdir c:\temp
@@ -447,15 +447,15 @@ The following procedure describes how to capture traces by using the [Time Trave
447447
```
448448

449449
1. In the `tasklist` command output, find the process identifier (`PID`) of *lsass.exe*.
450-
1. Run the following time travel debugging command (*[TTD.exe](/windows-hardware/drivers/debugger/time-travel-debugging-ttd-exe-command-line-util)*) to begin a tracing session of the *lsass.exe* process:
450+
1. To begin a tracing session of the *lsass.exe* process, run the following time travel debugging command (*[TTD.exe](/windows-hardware/drivers/debugger/time-travel-debugging-ttd-exe-command-line-util)*):
451451

452452
```cmd
453453
TTD.exe -attach <lsass-pid> -out c:\temp
454454
```
455455

456456
1. Lock the device that's signed in under the domain account.
457457
1. Unlock the device.
458-
1. Run the following TTD command to end the time travel tracing session:
458+
1. To end the time travel tracing session, run the following TTD command:
459459

460460
```cmd
461461
TTD.exe -stop all

0 commit comments

Comments
 (0)