Skip to content

Commit ceee978

Browse files
authored
Merge pull request #203863 from SnehaSudhirG/06July-TSManagedIdentity
Added new troubleshooting content
2 parents 1a7c501 + 14b28d4 commit ceee978

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

articles/automation/troubleshoot/managed-identity.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,31 @@ ms.topic: troubleshooting
1111

1212
This article discusses solutions to problems that you might encounter when you use a managed identity with your Automation account. For general information about using managed identity with Automation accounts, see [Azure Automation account authentication overview](../automation-security-overview.md#managed-identities).
1313

14+
## Scenario: Managed Identity in a Runbook cannot authenticate against Azure
15+
16+
### Issue
17+
When using a Managed Identity in your runbook, you receive an error as:
18+
`connect-azaccount : ManagedIdentityCredential authentication failed: Failed to get MSI token for account d94c0db6-5540-438c-9eb3-aa20e02e1226 and resource https://management.core.windows.net/. Status: 500 (Internal Server Error)`
19+
20+
### Cause
21+
22+
This can happen either when:
23+
24+
- **Cause 1**: You use the Automation account System Managed Identity, which has not yet been created and the `Code Connect-AzAccount -Identity` tries to authenticate to Azure and run a runbook in Azure or on a Hybrid Runbook Worker.
25+
26+
- **Cause 2**: The Automation account has a User managed identity assigned and not a System Managed Identity and the - `Code Connect-AzAccount -Identity` tries to authenticate to Azure and run a runbook on an Azure virtual machine Hybrid Runbook Worker using the Azure VM System Managed Identity.
27+
28+
29+
### Resolution
30+
31+
- **Resolution 1**: You must create the Automation Account System Managed Identity and grant it access to the Azure Resources.
32+
33+
- **Resolution 2**: As appropriate for your requirements, you can:
34+
35+
- Create the Automation Account System Managed Identity and use it to authenticate.</br>
36+
Or </br>
37+
- Delete the Automation Account User Assigned Managed Identity.
38+
1439
## Scenario: Unable to find the user assigned managed identity to add it to the Automation account
1540

1641
### Issue
@@ -30,6 +55,7 @@ This issue occurs when you don't have the following permissions for the user-ass
3055
### Resolution
3156
Ensure that you have [Identity Operator role permission](/azure/role-based-access-control/built-in-roles#managed-identity-operator) to add the user-assigned managed identity to your Automation account.
3257

58+
3359
## Scenario: Runbook fails with "this.Client.SubscriptionId cannot be null." error message
3460

3561
### Issue

0 commit comments

Comments
 (0)