participant
participant

Reputation: 3003

Add-AzureAccount in Azure-runbook fails with: The given key was not present in the dictionary

The two lines of code worked perfectly in one of my Azure-Powershell-Workflow runbook until recently.

$azureCredential = Get-AutomationPSCredential –Name "<asset-name>"
Add-AzureAccount -credential $azureCredential

Now it fails with the error-message Add-AzureAccount : The given key was not present in the dictionary. The inspection of the $azureCredential did not bring up anything suspicious.

Q What must I do to get it going again?

Upvotes: 0

Views: 2205

Answers (1)

Joe
Joe

Reputation: 2540

This error can happen in Add-AzureAccount if the credential doesn't have access to any RDFE (Azure Service Management) subscriptions. You can follow the directions here to add the credential to an RDFE subscription.

Upvotes: 1

Related Questions