Problem #1:
When you try to deploy Azure resource group template using Visual studio, it throws the below error-
New-AzureRmResourceGroup : Operation returned an invalid status code ‘Unauthorized’
New-AzureRmResourceGroupDeployment : The access token expiry UTC time ‘8/17/2018 6:23:12 AM’ is earlier than current
09:18:40 – UTC time ‘8/19/2018 9:18:39 PM’.
Solution #1:
There are different reasons for this error. I observed this happening in my setup when ever Windows PowerShell session is expired.
Actually Azure resource group deployment from VS uses *.ps1 (PowerShell script) to deploy. Try to connect to account again and select the right subscription using PowerShell-
connect-AzureRmAccount
It will ask for login details and then connect to the subscription name.
Now if you try the deployment of resource group again, it will work.
Problem #2:
Agent configuration failed with error : Deployment Group not found:
Solution #2:
There are different reasons for this error. One of the reason is Deployment group name, it should be unique. The error doesn’t indicate that but once I renamed the deployment group with unique name, the error disappeared.
Problem #3:
Code=QuotaExceeded; Message=Operation results in exceeding
16:45:53 – quota limits of Core. Maximum allowed: 10, Current in use: 10, Additional requested: 1.
Solution #3:
Based on error it is clear that the number of allowed vCPU’s for your subscription have reached the limit. You can check this using following PowerShell commands-
Get-AzureRmVMUsage -Location “South Central US”
Based on the output you can change the config of other VM machines (Size) whihc are not required or not heavily used Or place a request to increase the number of vCPU’s.