1

I was trying to create a multi node pool in Azure Batch (User Subscription) using C#. I have assigned the RBAC role of "Virtual Machine Contributor" to the Vnet for "Microsoft Azure Batch" along with it's already existing Contributor role. While I was able to create it successfully without Virtual Network Configuration, as soon as I add the property it fails with a Bad Request Exception. This is the snippet of code which i am using.

pool.NetworkConfiguration = new NetworkConfiguration
            {
                DynamicVNetAssignmentScope = 0,
                PublicIPAddressConfiguration = new PublicIPAddressConfiguration(IPAddressProvisioningType.NoPublicIPAddresses),
                SubnetId = "/subscriptions/<subscriptionId>/resourceGroups/<ResrouceGroupName>/providers/Microsoft.Network/virtualNetworks/<vnetName>/subnets/<subnetName>",
            };
Mahesh
  • 13
  • 2
  • Could you please provide the error message in detail? Besides, could you please use fiddler to catch the request? – Jim Xu Oct 23 '20 at 01:07

0 Answers0