Hi @Nikhil K M
If the price sheet API is returning null for the savingsPlan
, it could because there are no savings plans associated with the subscription. Confirm this in the Azure portal under Cost Management + Billing > Cost Management, select the subscription, and select Savings Plans from the left-hand menu.
If there are savings plans associated with the subscription, then there could be an issue with the API. In that case, please comment down below so I can inform the product team. Also, you can try using the cost details API, which is further explained under Get Azure consumption and savings plan cost data using API - Microsoft Cost Management | Microsoft Learn to generate a pricing report.
EDIT 16 Oct 2023 I've heard back from the product team. The aforementioned API is a sync API that doesn't support showing service plan prices. Instead, you'll have to use the download version, Price Sheet - Download By Billing Account Period - REST API (Azure Consumption) | Microsoft Learn, to get service plan prices.