首页 > 解决方案 > 通过 api 检索 Windows strore 应用程序的用户订阅时面临问题

问题描述

我已经在合作伙伴中心注册了一个应用程序,并将我的应用程序集成到 azure 广告应用程序中,当我尝试通过以下网址https://docs.microsoft 向用户添加订阅或获取用户的订阅时。 com/en-us/windows/uwp/monetize/get-subscriptions-for-a-user,我收到 AuthenticationTokenInvalid 错误

我已经通过传递我的客户端 ID 和客户端密码来调用https://login.microsoftonline.com/common/oauth2/token api,如上面提供的链接中所述,我能够检索https://的访问令牌onestore.microsoft.com 以及当我尝试通过https://purchase.mp.microsoft.com/v8.0/b2b/recurrences/query api获取已通过合作伙伴中心添加的订阅时传递我的 b2b 密钥,我收到以下错误

当我使用资源作为https://onestore.microsoft.com生成访问令牌时,我收到以下错误

{ "code": "Unauthorized", "data": [], "details": [], "innererror": { "code": "AuthenticationTokenInvalid", "data": [ "ObjectId is required." ]、“details”:[]、“message”:“提供的身份验证令牌无效”}、“message”:“客户端无权执行请求的操作。”、“source”:“PurchaseFD”} 以及何时我使用资源生成访问令牌https://onestore.microsoft.com/b2b/keys/create/purchase 我收到以下错误

{ "code": "Unauthorized", "data": [], "details": [], "innererror": { "code": "AuthenticationTokenInvalid", "data": [ "ObjectId is required." ],“详细信息”:[],“消息”:“提供的身份验证令牌无效”},“消息”:“客户端无权执行请求的操作。”,“来源”:“PurchaseFD”}

我已经按照上面粘贴的链接中提到的相同,但无法确定出了什么问题

标签: uwpin-app-purchasewindows-store-appsazure-active-directory

解决方案


推荐阅读