1

I am trying to call the Azure billing rate card api. The call is happening successfully after the authentication because the status code is OK. But though I have a vm in the corresponding resource group and subscription, always getting response as:

{"value":[]}

Same is happening in case of azure billing usage api. I had seen one question asked for billing usage api but I have tried all the options mentioned like keep the duration for 3 months, don’t keep future date etc, yet there is no response”:

{"value":[], nextLink:”https://….”}

Please let me know the issue could be abd because of which both rate card and usage api are not returning right data.

Thanks

  • Could this may be because- though I have contributor access to the resource group and the native app added has the permission to call the billing apis, I have just the “resource access” privilege in the concerned subscription? But I thought if that is the case, then probably my call to the rate card/usage apis would have failed saying access denied or unauthorized. But fortunately calls to api are going through and am getting status code as OK. – Rahul Bandopadhyaya Jan 20 '17 at 11:48
  • I don't think that's the reason. If you are in contributor role, the API call will work. Please share the API URL you're using. I'm guessing there's something missing there. – Gaurav Mantri Jan 20 '17 at 14:53
  • 2
    actually the reason was, the calling identity needs to be at least the "reader" at the subscription level. Though the identity has the contributor privilege at the azure account level. – Rahul Bandopadhyaya Feb 10 '17 at 06:00

1 Answers1

0

You were right, I had the same problem and i resolved it on giving 'reader' persmission on my servie account in my subscription .

Thx a lot !

Jean
  • 197
  • 10