通过API访问Partner Center客户遇权限问题求助
Partner Center API 认证及权限问题
我的核心需求:
- 读取Partner Center的完整客户列表
- 借助单个应用凭据,为任意Partner Center客户生成Graph API访问令牌,进而获取其用户列表
我参考Partner Center API认证文档的REST示例操作,但始终遭遇权限错误:
- 通过
https://login.microsoftonline.com/{tenantId}/oauth2/token发起OAuth 2.0客户端凭据流认证,参数设置为grant_type: client_credentials、resource: https://graph.windows.net,成功获取访问令牌 - 将该令牌作为Bearer令牌调用
https://api.partnercenter.microsoft.com/v1/customers接口时,返回403 Forbidden错误
另外尝试了另一令牌生成接口:
- 以之前获取的访问令牌作为Bearer,向
https://api.partnercenter.microsoft.com/generatetoken发送POST请求,参数为grant_type: jwt_token,返回错误信息:
{"error": "invalid_grant", "error_description": "Invalid authorization bearer is passed"}
内容的提问来源于stack exchange,提问作者chrispytoes
相关产品推荐
相关产品推荐

