Skip to content

Commit 52a9402

Browse files
authored
Merge pull request #112218 from BethWilke/branch131
Branch131
2 parents 29b5f20 + e697548 commit 52a9402

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

articles/automation/troubleshoot/runbooks.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -605,6 +605,33 @@ $SomeVariable = add-pnplistitem ....
605605
if ($SomeVariable.someproperty -eq ....
606606
```
607607

608+
## Scenario: Invalid status code "Forbidden" when using Key Vault inside a runbook
609+
610+
### Issue
611+
612+
When trying to access Key Vault through an Azure Automation runbook, you get the following error:
613+
614+
```error
615+
Operation returned an invalid status code 'Forbidden'
616+
```
617+
618+
### Cause
619+
620+
Possible causes for this issue:
621+
622+
* Not using a Run As account.
623+
* Insufficient permissions.
624+
625+
### Resolution
626+
627+
#### Not using Run As account
628+
629+
Follow steps at [Step 5 - Add authentication to manage Azure resources](https://docs.microsoft.com/azure/automation/automation-first-runbook-textual-powershell#add-authentication-to-manage-azure-resources) to ensure that you are using a Run As account to access Key Vault.
630+
631+
#### Insufficient permissions
632+
633+
Follow steps at [Add permissions to Key Vault](https://docs.microsoft.com/azure/automation/manage-runas-account#add-permissions-to-key-vault) to ensure that your Run As account has sufficient permissions to access Key Vault.
634+
608635
## <a name="other"></a>My problem isn't listed above
609636

610637
The sections below list other common errors and provide supporting documentation to help you resolve your issue.

0 commit comments

Comments
 (0)