0

Microsoft Store 提供此 API以在服务器到服务器调用中获取用户的订阅,这需要在StoreID调用中发送被调用的用户标识符。

上述链接上的 API 文档未提供错误代码,尤其是在以下情况下:

  1. 商店 ID 无效。
  2. 商店 ID 已过期(过去 90 天)。
  3. Azure AD 令牌无效/已过期。
  4. 其他错误场景。

是否有任何单独的文档链接具有完整的详细信息。

4

1 回答 1

0

我最近开始测试这些场景,发现问题中提到的不同场景的这些响应代码:

Azure AD 令牌已过期。

{
    "code": "Unauthorized",
    "data": [],
    "details": [],
    "innererror": {
        "code": "AuthenticationTokenInvalid",
        "data": [],
        "details": [],
        "message": "Authentication token supplied is invalid"
    },
    "message": "The client is not authorized to perform the requested operation.",
    "source": "PurchaseFD"
}

Azure AD 令牌无效。

{
    "code": "InternalServerError",
    "data": [],
    "details": [],
    "innererror": {
        "code": "InternalAadAuthenticationError",
        "data": [],
        "details": [],
        "message": "Internal error during AAD authentication."
    },
    "message": "An internal server error occurred while processing the operation.",
    "source": "PurchaseFD"
}

商店 ID 无效。

{
    "code": "InternalServerError",
    "data": [],
    "details": [],
    "innererror": {
        "code": "InternalAadAuthenticationError",
        "data": [
            "B2B key"
        ],
        "details": [],
        "message": "Internal error during AAD authentication."
    },
    "message": "An internal server error occurred while processing the operation.",
    "source": "PurchaseFD"
}

对于 Invalid Scenarios,我们得到 500 Internal Server Error 而不是处理错误,因此不能过多依赖它们。无法测试过期的商店 ID 案例,因为它的有效期为 90 天且尚未过期。

于 2019-10-10T10:19:23.660 回答