0

Is there a way to authenticate to Azure without any login on an Azure VM? Same feature like amazon instance profile so I can run azure commands without authentication

doktoric
  • 109
  • 2
  • 10

2 Answers2

1

I don't think it is possible to communicate with Azure cloud without authentication like AWS using the instance profile. In Azure you have to use service principle with respective role(Reader, contributor or owner) assigned. Once service principle is created you can use it for authentication with Azure SDK or REST API. You can automate once you have service principle details.

Bumblebee
  • 26
  • 2
0

You can use Azure CLI.

The authentication can be done using the Publish Settings file. This is useful if you wish to use Azure CLI commands in a script etc.

You can download the file by using

azure account download

Make sure you keep this file safe as it provides direct access to your azure account.

Then authentication is a simple process of importing the file using

azure account import /path/to/.publishsettings_file

Now deployment commands can be run on the command line without logging in.

Scroll to the section public settings file in the link for more info on how to use the publish settings file.

sentifool
  • 122
  • 3
  • 13
  • I know this one but the problem here if you want to automate this then you should pass .publishsettings_file to the userdata. I dont want to do this. – doktoric Aug 24 '16 at 11:44
  • You only require to do that once. And what exactly do you mean by userdata? – sentifool Aug 24 '16 at 11:54