I was using the following consumption usage detail in powershell azure automation runbook.
Get-AzureRmConsumptionUsageDetail -StartDate $startDate -EndDate $endDate -ResourceGroup
The same command and runbook works fine in another subscription. But in one of the subscription it gives the following error
Subscription scope usage is not supported for current api version. Please use api version after 2019-10-01
How to set apiversion in Azure Powershell ?