About roles and permissions for VPN
The VPN utilize multiple resources, such as virtual networks and IP addresses, during both creation and management operations. Because of this, it's essential to verify permissions on all involved resources during these operations.
Azure built-in roles
You can choose to assign Azure built-in roles to a user, group, service principal, or managed identity such as Network contributor, which support all the required permissions for creating the gateway. For more information, see Steps to assign an Azure role.
Custom roles
If the Azure built-in roles don't meet the specific needs of your organization, you can create your own custom roles. Just like built-in roles, you can assign custom roles to users, groups, and service principals at management group, subscription, and resource group scopes. For more information, see Steps to create a custom role .
To ensure proper functionality, check your custom role permissions to confirm user service principals, and managed identities operating the VPN gateway have the necessary permissions. To add any missing permissions listed here, see Update a custom role.
Permissions
Depending on whether you're creating new resources or using existing ones, add the appropriate permissions from the following list:
Resource | Resource status | Required Azure permissions |
---|---|---|
Subnet | Create new | Microsoft.Network/virtualNetworks/subnets/write Microsoft.Network/virtualNetworks/subnets/join/action |
Subnet | Use existing | Microsoft.Network/virtualNetworks/subnets/read Microsoft.Network/virtualNetworks/subnets/join/action |
IP addresses | Create new | Microsoft.Network/publicIPAddresses/write Microsoft.Network/publicIPAddresses/join/action |
IP addresses | Use existing | Microsoft.Network/publicIPAddresses/read Microsoft.Network/publicIPAddresses/join/action |
Local Network Gateway | Create new/ Update existing | Microsoft.Network/localnetworkgateways/write |
Connection | Create new/ Update existing | Microsoft.Network/connections/write |
Azure VPN Gateway | Create new/ Update existing | Microsoft.Network/localnetworkgateways/write Microsoft.Network/publicIPAddresses/join/action Microsoft.Network/virtualNetworks/subnets/join/action |
For more information, see Azure permissions for Networking and Virtual network permissions.
Roles scope
In the process of custom role definition, you can specify a role assignment scope at four levels: management group, subscription, resource group, and resources. To grant access, you assign roles to users, groups, service principals, or managed identities at a particular scope.
These scopes are structured in a parent-child relationship, with each level of hierarchy making the scope more specific. You can assign roles at any of these levels of scope, and the level you select determines how widely the role is applied.
For example, a role assigned at the subscription level can cascade down to all resources within that subscription, while a role assigned at the resource group level will only apply to resources within that specific group. Learn more about scope level For more information, see Scope levels.
Note
Allow sufficient time for Azure Resource Manager cache to refresh after role assignment changes.
Additional services
To view roles and permissions for other services, see the following links: