You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: Troubleshoot Error Codes During Runbook Execution in Azure Automation
3
+
description: Helps you troubleshoot some errors that occur during runbook execution in Azure Automation.
4
+
ms.date: 06/27/2025
5
+
ms.reviewer: adoyle, v-weizhu
6
+
ms.service: azure-automation
7
+
ms.custom: sap:Runbook not working as expected
8
+
---
9
+
# Troubleshoot error codes during runbook execution in Azure Automation
10
+
11
+
When using runbooks in Azure Automation, you might encounter issues due to runtime or PowerShell exceptions or specific error messages. This article lists some issues and provides solutions to them.
12
+
13
+
> [!NOTE]
14
+
> Azure Automation enables recovery of runbooks deleted in the last 29 days. You can restore the deleted runbook by running a PowerShell script as a job in your Automation account. For more information, see [Restore a deleted runbook](/azure/automation/manage-runbooks#restore-deleted-runbook).
15
+
16
+
## Troubleshoot error messages
17
+
18
+
Review the following table to resolve runbook execution-related error messages:
19
+
20
+
|Error|Description|Solution|
21
+
|-----|-----------|
22
+
|Unable to create a new Automation job in the West Europe region.|This issue occurs due to the scalability limits of the Automation service in the West Europe region. |To resolve this issue, follow the steps in [Unable to create new Automation job in West Europe region](/azure/automation/troubleshoot/runbooks#scenario-unable-to-create-new-automation-job-in-west-europe-region).|
23
+
|`The subscription cannot be found.`|This issue can occur when the runbook doesn't use a managed identity to access Azure resources. |To resolve this issue, follow the steps in [Unable to find the Azure subscription](/azure/automation/troubleshoot/runbooks#unable-to-find-subscription).|
24
+
|`Strong authentication enrollment is required.`|If you have multifactor authentication on your Azure account, you can't use a Microsoft Entra user to authenticate to Azure.|To resolve this issue, see [Authentication to Azure fails because multifactor authentication is enabled](/azure/automation/troubleshoot/runbooks#auth-failed-mfa).|
25
+
|Runbook fails with "No permission" or some variation.|The managed identity might not have the same permissions to Azure resources as your current account.|Make sure that your managed identity [has permission to access any resources](/azure/role-based-access-control/role-assignments-portal) used in your script.|
26
+
|Error: "429: The request rate is currently too large. Please try again."|This error can occur when retrieving job output from a runbook that has many verbose streams.|To resolve this error, see [The request rate is too large](/azure/automation/troubleshoot/runbooks#429).|
27
+
|`400 Bad Request.`|A "400 Bad Request" error can occur for several reasons. First, verify if the runbook works outside of Azure Automation. Typically, the runbook code doesn't work with this error due to:<br><br>- Missing values.<br>- Wrong values being passed.<br>- Older modules being used.<br>- A referenced resource being disabled; for example, the runbook calls a disabled or expired webhook.|To resolve this error, see [400 Bad Request status when calling a webhook](/azure/automation/troubleshoot/runbooks#expired%20webhook).|
28
+
|`Resource not found.`|Check the values provided for the resource. |The three values to check are:<br><br>- Resource name<br>- Resource group name<br>- Subscription<br><br>Confirm that the runbook has permissions in the subscription that contains the resource. To change the subscription, you can use the `Set-AzContext` or `az account set` command together with the `-DefaultProfile` parameter. Many commands provide a subscription parameter that allows a different subscription to be used than the current one.<br>Sign in to the Microsoft Azure portal. Find the resource being used and examine the resource name, resource group, and subscription.|
29
+
30
+
If none of these solutions addresses your issue, see [Troubleshoot runbook issues](/azure/automation/troubleshoot/runbooks).
31
+
32
+
> [!NOTE]
33
+
> Before opening a case, follow the steps in [Data to collect when opening a case for Azure Automation](/azure/automation/troubleshoot/collect-data-microsoft-azure-automation-case). This process will help us resolve your case as quickly as possible.
34
+
35
+
## References
36
+
37
+
-[Start a runbook in Azure Automation](/azure/automation/start-runbooks)
38
+
-[Run Automation runbooks on a Hybrid Runbook Worker](/azure/automation/automation-hrw-run-runbooks)
39
+
40
+
[!INCLUDE [Azure Help Support](../../../includes/azure-help-support.md)]
This article describes the methods to configure listener certificates on a Windows Server that is not part of a Remote Desktop Services (RDS) deployment.
16
+
This article describes the methods to configure listener certificates on a Windows Server that isn't part of a Remote Desktop Services (RDS) deployment.
17
17
18
18
_Original KB number:_ 3042780
19
19
20
20
## About Remote Desktop server listener availability
21
21
22
-
The listener component runs on the Remote Desktop server and is responsible for listening to and accepting new Remote Desktop Protocol (RDP) client connections. This lets users establish new remote sessions on the Remote Desktop server. There is a listener for each Remote Desktop Services connection that exists on the Remote Desktop server. Connections can be created and configured by using the Remote Desktop Services Configuration tool.
22
+
The listener component runs on the Remote Desktop server and is responsible for listening to and accepting new Remote Desktop Protocol (RDP) client connections. This lets users establish new remote sessions on the Remote Desktop server. There's a listener for each Remote Desktop Services connection that exists on the Remote Desktop server. Connections can be created and configured by using the Remote Desktop Services Configuration tool.
23
23
24
24
## Configure Remote Desktop server listener certificate
25
25
26
-
The MMC method is not available starting from Windows Server 2012 or Windows Server 2012 R2. However, you can always configure the RDP listener by using WMI or the registry.
26
+
### [WMI](#tab/wmi)
27
27
28
-
::: zone pivot="windows-server-pre-2012"
29
-
30
-
### [MMC](#tab/mmc)
31
-
32
-
The Remote Desktop Configuration Manager MMC snap-in enables you direct access to the RDP listener. In the snap-in, you can bind a certificate to the listener and in turn, enforce SSL security for the RDP sessions.
The configuration data for the RDS listener is stored in the `Win32_TSGeneralSetting` class in WMI under the `Root\CimV2\TerminalServices` namespace.
28
+
The configuration data for the RDS listener is stored in the `Win32_TSGeneralSetting` class in Windows Management Instrumentation (WMI) under the `Root\CimV2\TerminalServices` namespace.
39
29
40
30
The certificate for the RDS listener is referenced through the **Thumbprint** value of that certificate on a **SSLCertificateSHA1Hash** property. The thumbprint value is unique to each certificate.
41
31
42
32
> [!NOTE]
43
-
> Before you run the wmic commands, the certificate that you want to use must be imported to the Personal certificate store for the computer account. If you do not import the certificate, you will receive an **Invalid Parameter** error.
33
+
> Before you run the commands, the certificate that you want to use must be imported to the **Personal** certificate store for the computer account (via `certlm.msc`). If you don't import the certificate, you'll receive an **Invalid Parameter** error.
44
34
45
35
To configure a certificate by using WMI, follow these steps:
46
36
47
37
1. Open the properties dialog for your certificate and select the **Details** tab.
48
-
2. Scroll down to the **Thumbprint** field and copy the space delimited hexadecimal string into something like Notepad.
49
38
50
-
The following screenshot is an example of the certificate thumbprint in the **Certificate** properties:
39
+
::: zone pivot="windows-server-pre-2012"
40
+
41
+
2. Scroll down to the **Thumbprint** field and copy the space-delimited hexadecimal string into something like Notepad.
42
+
43
+
The following screenshot shows an example of the certificate thumbprint in the **Certificate** properties:
51
44
52
45
:::image type="content" source="./media/remote-desktop-listener-certificate-configurations/thumbprint-property.png" alt-text="An example of the certificate thumbprint in the Certificate properties.":::
53
46
@@ -61,47 +54,65 @@ To configure a certificate by using WMI, follow these steps:
61
54
62
55
Make sure that this ASCII character is removed before you run the command to import the certificate.
63
56
64
-
3. Remove all spaces from the string. There may be an invisible ACSII character that is also copied. This is not visible in Notepad. The only way to validate is to copy directly into the Command Prompt window.
57
+
3. Remove all spaces from the string. There may be an invisible ACSII character that is also copied. This character isn't visible in Notepad. To validate the string, copy the string directly into the Command Prompt window.
65
58
66
-
4. At command prompt, run the following wmic command together with the thumbprint value that you obtain in step 3:
67
-
68
-
::: zone pivot="windows-server-pre-2012"
59
+
4. At command prompt, run the following `wmic` command together with the thumbprint value that you obtain in step 3:
69
60
70
61
```console
71
62
wmic /namespace:\\root\cimv2\TerminalServices PATH Win32_TSGeneralSetting Set SSLCertificateSHA1Hash="THUMBPRINT"
72
63
```
73
64
65
+
The following screenshot shows a successful example:
66
+
67
+
:::image type="content" source="./media/remote-desktop-listener-certificate-configurations/successful-example-to-run-wmic-commands.png" alt-text="A successful example of running the `wmic` command together with the thumbprint value that you obtain in step 3." border="false":::
68
+
74
69
::: zone-end
75
70
::: zone pivot="windows-server-2012"
76
71
72
+
2. Scroll down to the **Thumbprint** field and copy the space-delimited hexadecimal string into a text editor like Notepad.
73
+
74
+
The following screenshot shows an example of the certificate thumbprint in the **Certificate** properties:
75
+
76
+
:::image type="content" source="./media/remote-desktop-listener-certificate-configurations/thumbprint-property.png" alt-text="An example of the certificate thumbprint in the Certificate properties.":::
77
+
78
+
When you copy the string into Notepad, it should look like the following screenshot:
79
+
80
+
:::image type="content" source="./media/remote-desktop-listener-certificate-configurations/thumbprint-string-in-notepad.png" alt-text="Copy and paste the thumbprint string into Notepad.":::
81
+
82
+
After you remove the spaces in the string, it still contains an invisible ASCII character that is only visible at the command prompt. The following screenshot shows an example:
83
+
84
+
:::image type="content" source="./media/remote-desktop-listener-certificate-configurations/ascii-character-in-command-prompt.png" alt-text="The invisible ASCII character that is only shown at the command prompt." border="false":::
85
+
86
+
Ensure that this ASCII character is removed before you run the command to import the certificate.
87
+
88
+
3. Remove all spaces from the string. There might be an invisible ACSII character that is also copied. This character isn't visible in Notepad. To validate the string, copy the string directly into the Command Prompt window.
89
+
90
+
4. At command prompt, run the following `wmic` command together with the thumbprint value that you obtain in step 3:
91
+
77
92
```console
78
93
wmic /namespace:\\root\cimv2\TerminalServices PATH Win32_TSGeneralSetting Set SSLCertificateSHA1Hash="THUMBPRINT"
79
94
```
80
95
81
-
::: zone-end
82
-
::: zone pivot="windows-11-or-server-2025"
96
+
The following screenshot shows a successful example:
:::image type="content" source="./media/remote-desktop-listener-certificate-configurations/successful-example-to-run-wmic-commands.png" alt-text="A successful example of running the `wmic` command together with the thumbprint value that you obtain in step 3." border="false":::
87
99
88
100
::: zone-end
101
+
::: zone pivot="windows-11-or-server-2025"
89
102
90
-
The following screenshot is a successful example:
103
+
2. Scroll down to the **Thumbprint** field and copy it. The following screenshot is an example of the certificate thumbprint in the **Certificate** properties:
91
104
92
-
::: zone pivot="windows-server-pre-2012"
105
+
:::image type="content" source="./media/remote-desktop-listener-certificate-configurations/thumbprint-property-windows11.png" alt-text="An example of the certificate thumbprint in the Certificate properties.":::
93
106
94
-
:::image type="content" source="./media/remote-desktop-listener-certificate-configurations/successful-example-to-run-wmic-commands.png" alt-text="A successful example of running the wmic command together with the thumbprint value that you obtain in step 3." border="false":::
107
+
3. At command prompt, runthe following PowerShell command together with the thumbprint value that you obtain in step 2:
:::image type="content" source="./media/remote-desktop-listener-certificate-configurations/successful-example-to-run-wmic-commands.png" alt-text="A successful example of running the wmic command together with the thumbprint value that you obtain in step 3." border="false":::
113
+
The following screenshot shows a successful example:
100
114
101
-
::: zone-end
102
-
::: zone pivot="windows-11-or-server-2025"
103
-
104
-
:::image type="content" source="./media/remote-desktop-listener-certificate-configurations/successful-example-to-run-powershell-commands.png" alt-text="A successful example of running the powershell command together with the thumbprint value that you obtain in step 3." border="false":::
115
+
:::image type="content" source="./media/remote-desktop-listener-certificate-configurations/successful-example-to-run-powershell-commands.png" alt-text="A successful example of running the PowerShell command together with the thumbprint value that you obtain in step 2." border="false":::
105
116
106
117
::: zone-end
107
118
@@ -134,14 +145,30 @@ To configure a certificate by using registry editor, follow these steps:
134
145
135
146
To change the permissions, follow these steps on the Certificates snap-in for the local computer:
136
147
137
-
1. Click **Start**, click **Run**, type *mmc*, and then click **OK**.
138
-
2. On the **File** menu, click **Add/Remove Snap-in**.
139
-
3. In the **Add or Remove Snap-ins** dialog box, on the **Available snap-ins** list, click **Certificates**, and then click **Add**.
140
-
4. In the **Certificates** snap-in dialog box, click **Computer account**, and then click **Next**.
141
-
5. In the **Select Computer** dialog box, click **Local computer: (the computer this console is running on)**, and then click **Finish**.
142
-
6. In the **Add or Remove Snap-ins** dialog box, click **OK**.
148
+
1. Select **Start**, select **Run**, type *mmc*, and then select **OK**.
149
+
2. On the **File** menu, select **Add/Remove Snap-in**.
150
+
3. In the **Add or Remove Snap-ins** dialog box, on the **Available snap-ins** list, select **Certificates**, and then select **Add**.
151
+
4. In the **Certificates** snap-in dialog box, select **Computer account**, and then select **Next**.
152
+
5. In the **Select Computer** dialog box, select **Local computer: (the computer this console is running on)**, and then select **Finish**.
153
+
6. In the **Add or Remove Snap-ins** dialog box, select **OK**.
143
154
7. In the **Certificates** snap-in, on the console tree, expand **Certificates (Local Computer)**, expand **Personal**, and then select the SSL certificate that you want to use.
144
155
8. Right-click the certificate, select **All Tasks**, and then select **Manage Private Keys**.
145
-
9. In the **Permissions** dialog box, click **Add**, type *NETWORK SERVICE*, click **OK**, select **Read** under the **Allow** check box, and then click **OK**.
156
+
9. In the **Permissions** dialog box, select **Add**, type *NETWORK SERVICE*, select **OK**, select **Read** under the **Allow** check box, and then select **OK**.
146
157
147
-
---
158
+
### [MMC](#tab/mmc)
159
+
160
+
::: zone pivot="windows-server-pre-2012"
161
+
162
+
The Remote Desktop Configuration Manager Microsoft Management Console (MMC) snap-in enables you direct access to the RDP listener. In the snap-in, you can bind a certificate to the listener and in turn, enforce SSL security for the RDP sessions.
163
+
164
+
::: zone-end
165
+
::: zone pivot="windows-server-2012"
166
+
167
+
The Microsoft Management Console (MMC) method isn't available starting from Windows Server 2012 or Windows Server 2012 R2. However, you can always configure the RDP listener by using WMI or the registry.
168
+
169
+
::: zone-end
170
+
::: zone pivot="windows-11-or-server-2025"
171
+
172
+
The Microsoft Management Console (MMC) method isn't available starting from Windows Server 2012 or Windows Server 2012 R2. However, you can always configure the RDP listener by using WMI or the registry.
0 commit comments