Load Balancer Least Privilege Permissions

For an administrator to be able to create Backend Pools on ELBs and Health Probes on ILBs the minimum permission that they’ll need is Network Contributor on those resources AND in the Virtual Network.

Run the Demo

The reason being that a change on the subnet is also required, as demonstrated in the following exception.

Message: The client 'Admin1@yourdomain.onmicrosoft.com' with object id '00000' has permission to perform action 'Microsoft.Network/loadBalancers/write' on scope '/subscriptions/00000/resourceGroups/rg-awsomeaz104-loadbalancer-permissions-demo/providers/Microsoft.Network/loadBalancers/lbi-awsomeaz104-loadbalancer-permissions-demo'; however, it does not have permission to perform action 'Microsoft.Network/virtualNetworks/subnets/join/action' on the linked scope(s) '/subscriptions/00000/resourceGroups/rg-awsomeaz104-loadbalancer-permissions-demo/providers/Microsoft.Network/virtualNetworks/vnet-awsomeaz104-loadbalancer-permissions-demo/subnets/LBI-Subnet' or the linked scope(s) are invalid.

In the experiment the following output was reproduced, this of course given that the Virtual Network resides on the same Resource Group.

TargetAssignmentScopeActionResultLeast
Privilege
ELBContributorExternal Load BalancerAdd Backend Pool
ELBNetwork ContributorExternal Load BalancerAdd Backend Pool
ELBNetwork ContributorResource GroupAdd Backend Pool
ELBOwnerExternal Load BalancerAdd Backend Pool
ILBContributorInternal Load BalancerAdd Health Probe
ILBNetwork ContributorInternal Load BalancerAdd Health Probe
ILBNetwork ContributorResource GroupAdd Health Probe
ILBOwnerInternal Load BalancerAdd Health Probe