User cannot create a VM with just the Virtual Machine Contributor role

Noopur Pathak 0 Reputation points
2024-09-10T15:16:08.73+00:00

Apologies if this has already been answered, but based on my testing, they also need a Storage Account Contributor Role, Network Contributor Role and the permission Microsoft.Compute/sshPublicKeys/write which does not seem to be in built in role, at least that I can find. Is there a way to do this without making a custom role?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,994 questions
Azure Role-based access control
Azure Role-based access control
An Azure service that provides fine-grained access management for Azure resources, enabling you to grant users only the rights they need to perform their jobs.
830 questions
{count} votes

2 answers

Sort by: Most helpful
  1. deherman-MSFT 37,416 Reputation points Microsoft Employee
    2024-09-10T16:24:02.7166667+00:00

    @Noopur Pathak

    The full description of the Virtual Machine Contributor role and individual permissions can be found here. Create and manage virtual machines, manage disks, install and run software, reset password of the root user of the virtual machine using VM extensions, and manage local user accounts using VM extensions. This role does not grant you management access to the virtual network or storage account the virtual machines are connected to. This role does not allow you to assign roles in Azure RBAC.

    The role has necessary permissions, but the VNET, Network Security Group, public IP, and storage account (if using boot diagnostics) needs to be created first, by a user with permissions. If those items are already created, then the role will provide the necessary permissions to create a VM. You could add the Network Contributor role, if you want to create the network items when creating the VM.

    Hope this helps. Let me know if you have further questions or issues.


    If you still have questions, please let us know in the "comments" and we would be happy to help you. Comment is the fastest way of notifying the experts.

    If the answer has been helpful, we appreciate hearing from you and would love to help others who may have the same question. Accepting answers helps increase visibility of this question for other members of the Microsoft Q&A community.

    Thank you for helping to improve Microsoft Q&A!

    User's image


  2. Noopur Pathak 0 Reputation points
    2024-09-17T18:25:36.74+00:00

    Based on comments by @deherman-MSFT , it looks like the answer is a custom role that includes the Network Contributor Role, Storage Account Contributor Role and Microsoft.Compute/sshPublicKeys/write permissions.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.