Azure COST API call via O365 login

Dondapati, Navin 281 Reputation points

Hi Guys,

We are using below cost api url to fetch data`131313/resourceGroups/rg1/providers/Microsoft.CostManagement/query?api-version=2019-11-01

it works fine when use it below url

But when we test in post man or other tools we receive below error
"error": {
"code": "AuthenticationFailed",
"message": "Authentication failed. The 'Authorization' header is missing."

We tried to pass (company O365 id which has access to that resource group) and pwd=xyz in the body.


Azure Cost Management
Azure Cost Management
A Microsoft offering that enables tracking of cloud usage and expenditures for Azure and other cloud providers.
2,100 questions
{count} votes

2 answers

Sort by: Most helpful
  1. SadiqhAhmed-MSFT 38,736 Reputation points Microsoft Employee

    @Anonymous - As mentioned, you need to pass the auth header in the request. The article below calls out options (using Postman)to authenticate to Azure Resource Manager.

    Authenticate Postman against Azure Service Management API | Codit


    If the response helped, do "Accept Answer" and up-vote it.

    0 comments No comments

  2. Dondapati, Navin 281 Reputation points
    0 comments No comments