This paper (and the sample files on GitHub) show you how to collect information about your deployed Azure resources using data from Azure management APIs.
Authored by Abhisek Banerjee, Rangarajan Srirangam, Mandar Inamdar, and Rakesh Patil, from AzureCAT (Customer Advisory Team).