Shlo
Shlo

Reputation: 1046

Whats my Azure VM administrator user name

My laptop is not working, so I'm trying to create an rdp connection to my azure VM on another computer. I do remember the password but not the username. Where can I find it?

Upvotes: 24

Views: 94584

Answers (11)

Shaahin
Shaahin

Reputation: 1225

There is a simpler way. First select your virtual machine, and then at right top corner, click on Json View (1) and here you can see your username (2), Azure Visual Machine username view in Json

Upvotes: 0

jyothi sindhu
jyothi sindhu

Reputation: 1

I found a way to get the user name for an existing VM -

Go to the windows VM – Select Export Template from the left under Automation -> Choose Deploy -> Choose Edit Template -> Then from the template you can search for “adminUsername” and you can find the Username from there. VM_Username

Upvotes: 0

Oleh Tarasenko
Oleh Tarasenko

Reputation: 612

Actually you can see it, Windows or Linux VM's:

1. Through VM resource --> Connect --> SSH

enter image description here

2. Also, you can use "Run command" for virtual machine Linux:

enter image description here

, and for virtual machine on Windows:

enter image description here

3. You can use PowerShell:

Get-AZVM -Name *vmname* | Select-Object -ExpandProperty OSProfile

enter image description here

You can also use Serial Console down in Support + troubleshooting in case you experiencing issues with RDP or SSH connection. Or reset your password with Reset password in the same block.

Upvotes: 13

IT_Makes_you_old
IT_Makes_you_old

Reputation: 1

I was looking for an answer as wlel as and the best solution for me was to run Powershell command Get-Localuser. Run using the RUN Command on the VM.

The fix RDP issue did not work for me and as soon I got my username I was in.

Might be an old post but might help others because I did not see a single post with this information.

Upvotes: 0

JohnEM
JohnEM

Reputation: 11

You can get your username from PowerShell or Azure CLI:

az login
(az vm list | ConvertFrom-Json).osProfile.adminUsername

Azure CLI Reference: https://learn.microsoft.com/en-us/cli/azure/authenticate-azure-cli?view=azure-cli-latest

Upvotes: 1

astaykov
astaykov

Reputation: 30903

Here is a good article on how to change the build-in Admin accounts credentials. Try with this approach, as there is no other way to get your user name.

Upvotes: 0

ironman
ironman

Reputation: 1066

[Update] - [26 March 2020] Now with updated Azure screens and view, we do not have option to retrieve Azure VM username from portal but there is a workaround.

  • Go to "Reset Password" on the left pane of your Azure portal window for your VM. Now add username and password and update. With this new username and password, you can login to VM machine and find your old/original username.

[OLD ANSWER - Not Valid Now]: While troubleshooting I tried to find the newly created VM's username with below steps, I hope this will help someone.

1) Go to "Virtual Machines" section on your Azure portal.

2) Select your newly created Virtual Machine name.

3) Click on the "Connect" link just next to the "Start" in the selection bar.

4) There will be a new blade opened for you on the right, with two tabs "RDP" and "SSH".

5) Select the "SSH", there next to the "Login using your VM local account" you find ssh yourusername@"VM's IP address".

you can use yourusername to login to the machine with required password.

Upvotes: 37

Ritesh Tyagi
Ritesh Tyagi

Reputation: 55

It is visible when you try to connect to your vm using ssh as mentioned in above answer. You can also find it under "Automation Scripts" tab. Under Automation script -> Template, search for "adminUsername"

Upvotes: 0

kode-Aid
kode-Aid

Reputation: 41

You can also find username in Home > Resource groups > XXXX - Deployments and click Template. This Template will be a json key value pair file. Refer to the attached screenshot.

You can also click on Outputs above Template and it will provide you with adminusername.

Upvotes: 2

Dinesh Kumar P
Dinesh Kumar P

Reputation: 1168

Just check the "Login using VM local account" field. It will have the username of your VM VM-Username

Upvotes: 5

Onur Demir
Onur Demir

Reputation: 738

I hope you were able to find your username in 3 years. I have the same issue and found the solution. Answering for new comers.

Just click "configure" button on the VM overview page. VM-Overview page

Upvotes: 6

Related Questions