Microsoft Azure The Subscription is Not Registered to Use Namespace

Table of Contents

This article describes errors that occur when you use a resource provider you haven’t already used in your Azure subscription. The errors are displayed when you deploy resources in Azure. If Azure doesn’t automatically register a resource provider, you can do a manual registration.

Az.MySql.internalNew-AzMySqlServer : The subscription registration is in 'Unregistered' state. The subscription must
be registered to use namespace 'Microsoft.DBforMySQL'. See https://aka.ms/rps-not-found for how to register
subscriptions.
At C:Program FilesWindowsPowerShellModulesAz.MySql1.0.0customNew-AzMySqlServer.ps1:231 char:11
+           Az.MySql.internalNew-AzMySqlServer @PSBoundParameters
+           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: ({ SubscriptionI...rverForCreate }:<>f__AnonymousType13`4) [New-AzMySq
   lServer_Create], Exception
    + FullyQualifiedErrorId : MissingSubscriptionRegistration,Microsoft.Azure.PowerShell.Cmdlets.MySql.Cmdlets.NewAzMy
   SqlServer_Create

Enabling a namespace provider from Azure Portal UI

1. Login into Azure portal then open your subscription from All services blade.

Microsoft Azure The Subscription is Not Registered to Use Namespace

2. In the Subscription page, scroll down then select Resource Providers you will see lot of namespace providers such as following, and many of them will be Not registered.

3. In the search box search for the namespace that you want to enable. Then select it from the filtered option and click on Register.

Microsoft Azure The Subscription is Not Registered to Use Namespace

4. It will start registering namespace provider, it will take some time to register.

Microsoft Azure The Subscription is Not Registered to Use Namespace

5. Try refreshing to see the Registered status. Once done, you can trying to create an Azure resource to verify it works.

Microsoft Azure The Subscription is Not Registered to Use Namespace

Register a namespace provider using Azure PowerShell

1. Connect to Microsoft Azure PowerShell.

2. Then finally register the required namespace provider.

Register-AzResourceProvider -ProviderNamespace Microsoft.DBforMySQL

3. After few minutes, you can user the Get-AzResourceProvider to get the registration status.

Get-AzResourceProvider -ProviderNamespace Microsoft.DBforMySQL | FT
ProviderNamespace    RegistrationState ResourceTypes                                                 Locations                                                                      ZoneMappings
-----------------    ----------------- -------------                                                 ---------                                                                      ------------
Microsoft.DBforMySQL Registered        {operations}                                                  {Australia Central, Australia Central 2, Australia East, Australia Southeast…} 
Microsoft.DBforMySQL Registered        {servers}                                                     {Australia Central, Australia Central 2, Australia East, Australia Southeast…} 
Microsoft.DBforMySQL Registered        {flexibleServers}                                             {Australia Southeast, Canada East, East Asia, East US 2…}                      
Microsoft.DBforMySQL Registered        {servers/recoverableServers}                                  {Australia Central, Australia Central 2, Australia East, Australia Southeast…} 
Microsoft.DBforMySQL Registered        {servers/virtualNetworkRules}                                 {Australia Central, Australia Central 2, Australia East, Australia Southeast…} 
Microsoft.DBforMySQL Registered        {locations/capabilities}                                      {Australia Southeast, Canada East, East Asia, East US 2…}                      
Microsoft.DBforMySQL Registered        {locations/checkNameAvailability}                             {Australia East, Australia Southeast, Brazil South, Canada Central…}           
Microsoft.DBforMySQL Registered        {checkNameAvailability}                                       {Australia Central, Australia Central 2, Australia East, Australia Southeast…} 
Microsoft.DBforMySQL Registered        {getPrivateDnsZoneSuffix}                                     {Australia Central, Australia Central 2, Australia East, Australia Southeast…} 
Microsoft.DBforMySQL Registered        {locations/checkVirtualNetworkSubnetUsage}                    {Australia Southeast, Canada East, East Asia, East US 2…}                      
Microsoft.DBforMySQL Registered        {locations}                                                   {Australia Central, Australia Central 2, Australia East, Australia Southeast…} 
Microsoft.DBforMySQL Registered        {locations/operationResults}                                  {Australia Central, Australia Central 2, Australia East, Australia Southeast…} 
Microsoft.DBforMySQL Registered        {locations/azureAsyncOperation}                               {Australia Central, Australia Central 2, Australia East, Australia Southeast…} 
Microsoft.DBforMySQL Registered        {locations/administratorOperationResults}                     {Australia Central, Australia Central 2, Australia East, Australia Southeast…} 
Microsoft.DBforMySQL Registered        {locations/administratorAzureAsyncOperation}                  {Australia Central, Australia Central 2, Australia East, Australia Southeast…} 
Microsoft.DBforMySQL Registered        {locations/privateEndpointConnectionProxyOperationResults}    {Australia Central, Australia Central 2, Australia East, Australia Southeast…} 
Microsoft.DBforMySQL Registered        {locations/privateEndpointConnectionProxyAzureAsyncOperation} {Australia Central, Australia Central 2, Australia East, Australia Southeast…} 
Microsoft.DBforMySQL Registered        {locations/privateEndpointConnectionOperationResults}         {Australia Central, Australia Central 2, Australia East, Australia Southeast…} 
Microsoft.DBforMySQL Registered        {locations/privateEndpointConnectionAzureAsyncOperation}      {Australia Central, Australia Central 2, Australia East, Australia Southeast…} 
Microsoft.DBforMySQL Registered        {locations/performanceTiers}                                  {Australia Central, Australia Central 2, Australia East, Australia Southeast…} 
Microsoft.DBforMySQL Registered        {locations/securityAlertPoliciesAzureAsyncOperation}          {Australia Central, Australia Central 2, Australia East, Australia Southeast…} 
Microsoft.DBforMySQL Registered        {locations/securityAlertPoliciesOperationResults}             {Australia Central, Australia Central 2, Australia East, Australia Southeast…} 
Microsoft.DBforMySQL Registered        {locations/recommendedActionSessionsAzureAsyncOperation}      {Australia Central, Australia Central 2, Australia East, Australia Southeast…} 
Microsoft.DBforMySQL Registered        {locations/recommendedActionSessionsOperationResults}         {Australia Central, Australia Central 2, Australia East, Australia Southeast…} 
Microsoft.DBforMySQL Registered        {servers/topQueryStatistics}                                  {Australia Central, Australia Central 2, Australia East, Australia Southeast…} 
Microsoft.DBforMySQL Registered        {servers/queryTexts}                                          {Australia Central, Australia Central 2, Australia East, Australia Southeast…} 
Microsoft.DBforMySQL Registered        {servers/waitStatistics}                                      {Australia Central, Australia Central 2, Australia East, Australia Southeast…} 
Microsoft.DBforMySQL Registered        {servers/resetQueryPerformanceInsightData}                    {Australia Central, Australia Central 2, Australia East, Australia Southeast…} 
Microsoft.DBforMySQL Registered        {servers/advisors}                                            {Australia Central, Australia Central 2, Australia East, Australia Southeast…} 
Microsoft.DBforMySQL Registered        {servers/privateLinkResources}                                {Australia Central, Australia Central 2, Australia East, Australia Southeast…} 
Microsoft.DBforMySQL Registered        {servers/privateEndpointConnections}                          {Australia Central, Australia Central 2, Australia East, Australia Southeast…} 
Microsoft.DBforMySQL Registered        {servers/privateEndpointConnectionProxies}                    {Australia Central, Australia Central 2, Australia East, Australia Southeast…} 
Microsoft.DBforMySQL Registered        {servers/keys}                                                {Australia Central, Australia Central 2, Australia East, Australia Southeast…} 
Microsoft.DBforMySQL Registered        {locations/serverKeyAzureAsyncOperation}                      {Australia Central, Australia Central 2, Australia East, Australia Southeast…} 
Microsoft.DBforMySQL Registered        {locations/serverKeyOperationResults}                         {Australia Central, Australia Central 2, Australia East, Australia Southeast…} 
Microsoft.DBforMySQL Registered        {servers/start}                                               {Australia Central, Australia Central 2, Australia East, Australia Southeast…} 
Microsoft.DBforMySQL Registered        {servers/stop}                                                {Australia Central, Australia Central 2, Australia East, Australia Southeast…} 
Microsoft.DBforMySQL Registered        {servers/upgrade}                                             {Australia Central, Australia Central 2, Australia East, Australia Southeast…}

Summary

In this post we learned how to fix the following error: The subscription is not registered to use namespace.

Leave a Comment

Required fields are marked *