尝试获取 Azure 价目表时出错

Error while trying obtain Azure Rate Card

我正在尝试为我的 Azure 订阅下载价目表,但从今天早上开始,请求以 HTTP 400 结束。这是错误

<?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>

我打的Api电话是。在 header 中,我还传递了访问令牌。

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

同一个访问令牌似乎可以用于其他目的。但是突然之间,价目表 API 似乎失效了。

如果 Microsoft 方面有任何变化,您有什么想法吗?

当您使用对 url 的授权进行 GET 调用时

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

它将响应 400 作为状态代码。但它也会给 302 作为状态,位置 header 像这样:

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 

现在在没有授权的情况下对位置进行 GET 调用 header(因为它已经在之前的调用中进行了身份验证),现在您可以获得价目表。

同样的问题,似乎 MSFT 正在处理它:Authorization format fail #7423