Quantcast
Channel: TechNet Blogs
Viewing all articles
Browse latest Browse all 34890

Query request for Azure Usage/Billing API using Postman

$
0
0

Reference Link to query report.

https://msdn.microsoft.com/library/en-us/Mt218998.aspx

 

Generate Bearer Token

Login-AzureRmAccount
$AccountName ="azureauto@AADTenants.onmicrosoft.com"
$Password = "UserPassword"

$PayLoad="resource=https://management.core.windows.net/&client_id=xxxxxxxxxxxxxxxxxxxxx&grant_type=password&username="+$AccountName+"&scope=openid&password="+$Password
$Response=Invoke-WebRequest -Uri "https://login.microsoftonline.com/Common/oauth2/token" -Method POST -Body $PayLoad

$ResponseJSON=$Response|ConvertFrom-Json
$ResponseJSON

Results,

 

From Postman


Viewing all articles
Browse latest Browse all 34890

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>