Hello, @SunnyDev !
How do I provide VM access only to specific users?
If you have software on a virtual machine that you only want certain users to access, one approach would be to use Role Based Access Control (RBAC) to limit who has access to the virtual machine. There are two built in roles which would work well here although you can customize your own as well:
- Virtual Machine User Login: View Virtual Machines in the portal and login as a regular user.
- Virtual Machine Administrator Login: View Virtual Machines in the portal and login as administrator.
You can also create specific user accounts on the VM itself:
https://learn.microsoft.com/en-us/answers/questions/529722/sharing-a-vm-to-another-user
If you want to share access RDP access to the Azure VM running Windows 10 with another user, please perform the following actions:
- Connect to the VM via RDP and login to the administrator account. [How-to guide]
- Create a local user or administrator account in Windows 10. [How-to guide]
- Navigate to Control Panel > System and Security > Administrative Tools > Computer Management
- Click Local Users and Groups, click Groups, then double-click Remote Desktop Users.
- In Remote Desktop Properties dialog box, click Add… box. In Select Users dialog box, enter the account name and then click OK. Once this is done, you can share the Azure Virtual Machine's Public IP Address (available on the Overview section in the Virtual Machine's Blade on the Azure Portal) and the credentials of the account you created in step 2 with the desired user(s) . With these, they should be able to RDP from their local machine using Win+R > mstsc.exe. (Computer name on the mstsc.exe Remote Desktop Connection dialog box should be the Virtual Machine's Public IP address)
I hope this has been helpful! Your feedback is important so please take a moment to accept answers. If you still have questions, please let us know what is needed in the comments so the question can be answered. Thank you for helping to improve Microsoft Q&A!