简体   繁体   中英

Error while trying obtain Azure Rate Card

I am trying to download the rate card for my Azure subscription and since this morning the request is ending in an HTTP 400. This is the error

<?xml version="1.0" encoding="utf-8"?>
<Error>
    <Code>InvalidAuthenticationInfo</Code>
    <Message>Authentication information is not given in the correct format. Check the value of Authorization header.
RequestId:757bb26d-801e-005b-45e9-d7361f000000
Time:2018-04-19T14:19:26.9289239Z</Message>
</Error>

The Api Call I make is. In the header I also pass the access token.

https://management.azure.com/subscriptions/<subscription id>/providers/Microsoft.Commerce/RateCard?api-version=2015-06-01-preview&$filter=OfferDurableId+eq+%27MS-AZR-0003P%27+and+Currency+eq+%27USD%27+and+Locale+eq+%27en-US%27+and+RegionInfo+eq+%27US%27

The same access token seems to be working fine for other purpose. But all of a sudden it seems the rate card API is failing.

Any ideas if anything changed on the Microsoft side ?

When you make a GET call with Authorization to the url

https://management.azure.com/subscriptions/<subscription id>/providers/Microsoft.Commerce/RateCard?api-version=2015-06-01-preview&$filter=OfferDurableId+eq+%27MS-AZR-0003P%27+and+Currency+eq+%27USD%27+and+Locale+eq+%27en-US%27+and+RegionInfo+eq+%27US%27

It will respond 400 as Status Code. But Also it will give 302 as status with a Location header like this :

Location : https://ratecard.blob.core.windows.net/ratecards/asdfghjk-db2f-4847-b3a0-d556072000f6%5CMS-AZR-0003P%5CUSD%5Cen-US%5CFalse/2015-06-01-preview/1bc08f92-830c-43c7-b8b4-6bc1d8875d0e.json?sv=2016-05-31&sr=b&sig=asdfghjkc6EbDNOUVEDc4M69YqHoH8ERQy5BJWKfSEU%3D&se=2018-04-24T07%3A00%3A19Z&sp=r&rsct=application%2Fjson 

Now make a GET call to the location without Authorization header(cuz its already authenticated in previous call) and now you can get the Rate Card.

同样的问题,似乎MSFT正在处理: 授权格式失败#7423

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM