Forum Discussion
Azure advisor API
You need to leave the Virtual Machines on long enough for it to detect that you can reduce the cost by resizing, for example turning them off each night won't allow enough time for the advisor to collate and do any recommendations, as they aren't on for long enough, Advisor monitors for 7 days, as far as I am aware there is no way to force this, as it collates data and does some smart machine learning in the backend.
"Advisor monitors your virtual machine usage for 7 days and then identifies low-utilization virtual machines. Virtual machines are considered low-utilization if their CPU utilization is 5% or less and their network utilization is less than 2% or if the current workload can be accommodated by a smaller virtual machine size."
https://docs.microsoft.com/en-us/azure/advisor/advisor-get-started#configure-low-usage-vm-recommendation
Also, take a look at Microsoft Graph Explorer as well, I wrote a brief blog article about it - using the Advisor a few months ago you may be interested in: https://luke.geek.nz/azure-resource-graph-explorer-and-the-powershell-azure-resource-graph