Have you ever run into the error “SubscriptionNotRegistered : The subscription [subscriptionId] is not registered “and didn’t find a solution to it? Keep reeding!

When you add a new customer or subscription to Azure Stack and you would like that their usage is reported under their own Azure subscription connected with their own AAD tenant you’ll need to register the subscription.

To do so, you use the command:

New-AzureRmResource -ResourceId "subscriptions/{registrationSubscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/customerSubscriptions/{customerSubscriptionId}" -ApiVersion 2017-06-01

The error

When you use capitals in the registrationSubscriptionId or in the customerSubscriptionId you will run into an error SubscriptionNotRegistered : The subscription is not registered.

The solution

Most of the times I use lower case, however this time I copied the subscriptionId from a field where it was written in capitals. Lucky it didn’t cost much time to test this out.

Change the capitals to lower case and you will be fine.