4

Here I'm working with Azure Automation and i'm trying to schedule the auto start and auto stop of Virtual Machines.I have taken a runbook "Scheduled Virtual Machine ShutDown/StartUp" from the gallery and created a runbook. when i tried to test it, then it's prompting me to enter "AZURE CREDENTIAL NAME" and "AZURE SUBSCRIPTION NAME", I have entered azure credential name as my "account name"(i.e praveengogula22outlook.onmicrosoft.com) and azure subscription name as "Azure Pass". Then it throws an error saying that "Failed to get credential with name [some name] Exiting runbook due to error". I just want to know what exactly "AZURE CREDENTIAL NAME" and which name should i enter over there.So can any one please provide me with a solution to automate startup/shutdown of virtual machines. Thank You.

praveen gogula
  • 599
  • 3
  • 6
  • 22

1 Answers1

4

You need to create a credential asset in your automation account. The account you use for the credential must be an organizational account (not a microsoft account) and it must have access to the subscription you are specifying.
When you execute your runbook you will then give it the name of this credential asset.

BenV
  • 12,052
  • 13
  • 64
  • 92
  • Thank's for your response, I have done as you said but i'm using azure pass and i got the following error."Targeting subscription [] (ERROR: No accessible subscription found with name or ID [Azure Pass] Exiting runbook due to error)". – praveen gogula Jul 27 '15 at 17:36
  • Then "Azure Pass" is not the name of your subscription. Which portal are you using, new (portal.azure.com) or classic (manage.windowsazure.com)? – BenV Jul 27 '15 at 17:52
  • On the dashboard page of your automation account, if you scroll down and look at the "quick glance" section on the right side, you should be able to find your subscription name. The subscription ID is there too, you could also try using that. – BenV Jul 27 '15 at 19:56
  • I have subscription name as "Azure Pass" and i tried, still getting same error – praveen gogula Jul 28 '15 at 11:48
  • Try passing the subscription ID. – BenV Jul 28 '15 at 13:29
  • If have entered it too. Same problem – praveen gogula Jul 28 '15 at 13:30
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/84471/discussion-between-praveen-gogula-and-benv). – praveen gogula Jul 28 '15 at 13:31