Created
February 5, 2016 16:13
-
-
Save adamdriscoll/63fad1ab7956fe79af9b to your computer and use it in GitHub Desktop.
Azure Automation Exception
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void Authenticate() | |
{ | |
SubscriptionCloudCredentials cred; | |
var cert = new X509Certificate2(Convert.FromBase64String(AzureSettings.ManagementCertificate)); | |
cred = new CertificateCloudCredentials(AzureSettings.Id, cert); | |
var automationManagementClient = new AutomationManagementClient(cred); | |
var content = automationManagementClient.Runbooks.Content("<resource group>", "<automation account>", "<runbook>"); | |
} | |
/* Returns the following exception | |
An unhandled exception of type 'Hyak.Common.CloudException' occurred in Microsoft.Threading.Tasks.dll | |
Additional information: AuthenticationFailed: Authentication failed. The 'Authorization' header is missing.*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment