Subscription not registered to use namespace 'Microsoft.Network'
Since the chosen answer uses a link that no longer exists, this is what helped me (through the Azure Portal).
- Navigate to the Azure Portal
- Under All Services, select Subscriptions
- Select the subscription you are using
- On the left menu, under Settings, select Resource Providers
- Find the provider you need (Microsoft.Network) and click Register
I got these instructions from the following link.https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-register-provider-errors#solution-3---azure-portal