【发布时间】:2018-10-22 20:10:23
【问题描述】:
要获取价目表,我使用的是下面的 api。
https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Commerce/RateCard?api-version=2015-06-01-preview&$filter=OfferDurableId+eq+{offer-id}+and+Currency+eq+'USD'+and+Locale+eq+'en-US'+and+RegionInfo+eq+'IN'
我在请求中传递了值为“Bearer eyioe ...”的授权标头。 它之前工作过,但最近得到以下响应
<?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:5dc4ea49-b01e-00f9-6760-dcfb83000000
Time:2018-04-25T06:42:45.8106146Z</Message>
</Error>
【问题讨论】:
-
我不确定,请检查您请求中的
content type是否为application/json。 -
您是如何获得访问令牌的?
-
@WayneYang-MSFT 内容类型没有帮助。令牌是使用 adalj4 库获取的
-
我也有同样的问题。在 Postman 中工作,但不在 C# 应用程序中工作。使用完全相同的不记名令牌和标头。
标签: azure azure-active-directory