Azure Billing WARNING: Offer id MS-AZR-0017P is not supported SOLVED

When you try to execute the PowerShell Cmdlet Get-AzureRmConsumptionUsageDetail or other Cmdlet from AzureRM.Consumption module.

This situation may happen for many reasons, for example you are trying to use a not supported Azure Subscription type, you can check the supported types in the list below.

https://azure.microsoft.com/en-us/support/legal/offer-details/

You won’t see this offer in the list because this is the Enterprise Agreement offering code.
For me the message error was a bit misleading, and after some investigation I found that the issue is due by a not updated AzureRM.Consumption module version.

To solve this issue you need to start a PowerShell console as Administrator, and you need to update your Azure module using the command below:

Install-Module
-Name
AzureRM
-Repository
PSGallery
-Force


and after that I would recommend an update

Update-Module
-Name
AzureRM

Now close all your PowerShell consoles instances running and reopen again.

Related blog posts