The subscription is not in registered state for the resource provider: Microsoft.Quota

In this Azure PowerShell article, we will discuss how to fix the error “The subscription is not in registered state for the resource provider: Microsoft.Quota.” that I got while executing the Get-AzQuota PowerShell command.

The subscription is not in registered state for the resource provider: Microsoft.Quota

Recently, I was working on a critical requirement where I had to execute the Get-AzQuota PowerShell command, the moment I executed this command, I got this error.

I was executing the below Azure PowerShell command

Import-Module Az.Quota
Get-AzQuota -Scope "subscriptions/1cdf4300-dee5-4518-8c8c-feaa72a5fgr1/providers/Microsoft.Network/locations/eastus"

After executing this I got the below complete error

Get-AzQuota : The subscription is not in registered state for the resource provider: 
Microsoft.Quota.
At line:2 char:1
+ Get-AzQuota -Scope "subscriptions/1cdf4300-dee5-4518-9c9c-feaa72a5cbd ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: ({ Scope = subsc...ations/eastus }:<> 
   f__AnonymousType4`1) [Get-AzQuota_List], Exception
    + FullyQualifiedErrorId : MissingRegistrationForResourceProvider,Microsoft.Azure. 
   PowerShell.Cmdlets.Quota.Cmdlets.GetAzQuota_List

You can see the same output below

The subscription is not in registered state for the resource provider Microsoft.Quota

Now how did I fix this error “The subscription is not in registered state for the resource provider“.

The subscription is not in registered state for the resource provider [Solution]

To fix this error, I have followed the below steps.

  1. Open PowerShell ISE –> Right click –> Select the “Run as administrator” mode.
  2. Ran the below PowerShell script to register my subscription Id with Microsoft.Quota.
Register-AzureRmResourceProvider -ProviderNamespace Microsoft.Quota

After executing the above command, I got the below-expected output

ProviderNamespace : Microsoft.Quota
RegistrationState : Registering
ResourceTypes     : {usages, quotas, quotaRequests, operationsStatus...}
Locations         : {}

You can see the same output here

Register-AzureRmResourceProvider -ProviderNamespace Microsoft.Quota

3. Now, I have executed the PowerShell script with the Get-AzQuota PowerShell command again, and this time I got the expected output as below.

Import-Module Az.Quota
Get-AzQuota -Scope "subscriptions/1cdf4300-dee5-4518-8c8c-feaa72a5fgr1/providers/Microsoft.Network/locations/eastus"

After executing the above script, I got the expected output successfully without any issues, You can see the below screenshot for your reference.

Get-AzQuota

You may also like following the below articles

Wrapping Up

In this article, we discussed how to fix the error “The subscription is not in registered state for the resource provider: Microsoft.Quota”. Hope this information will help you to fix your issue as well. Thanks for reading this article !!!