弃用 Azure AD Graph 令牌
适用于:合作伙伴中心 | 由世纪互联运营的合作伙伴中心 | Microsoft Cloud for US Government 合作伙伴中心
为改善我们的安全状况,我们将弃用 graph.windows.net 受众令牌。 为了与此改善保持一致,我们正在更改调用合作伙伴中心 API 的方式。 请采取必要的操作来为此更改做好准备。 下面是日程表:
立即开始:
- 如果你使用 generateToken API,停止对 API 响应中的令牌进行解码,并删除对 API 返回的令牌中任何声明的依赖项。 较新版本的 API 可能不包含所有声明。
即将推出:
- generateToken API
https://api.partnercenter.microsoft.com/v3/generatetoken
的新版本已推出,并且在用户令牌和仅应用场景中,仅接受 api.partnercenter.microsoft.com 受众令牌。 合作伙伴必须在 2025 年 8 月底之前进行此更改。 - 如果你通过发送 Azure AD Graph 受众令牌直接调用合作伙伴中心 API,则必须开始发送 api.partnercenter.microsoft.com。
- 当前:
resource=https://graph.windows.net&client_id={client-ID-here}&client_secret={client-secret-here}&grant_type=client_credentials
- 建议:
resource=https://{domain}&client_id={client-ID-here}&client_secret={client-secret-here}&grant_type=client_credentials
- 例如,
resource=https://api.partnercenter.microsoft.com&client_id={client-ID-here}&client_secret={client-secret-here}&grant_type=client_credentials
- 例如,
- 当前:
- 对于中国,
https://graph.chinacloudapi.cn
必须更改为https://partner.partnercenterapi.microsoftonline.cn
2025 年 8 月:
- generatetoken API 已被弃用。
- 合作伙伴中心 API 不再接受 graph.windows.net 受众令牌。