Graph API身份验证|请求正文必须包含以下参数“ grant_type”

时间:2020-09-10 16:54:57

标签: microsoft-graph-api azure-ad-graph-api office365api

我正在尝试使用邮递员向Graph进行身份验证。我有以下要求:

类型:发布 网址:https://login.microsoftonline.com/[MyTenantIdHere]/oauth2/v2.0/token

身体=原始:

{
  client_id: "[MyClientID]",
  grant_type: "client_credentials",
  scope: "https%3A%2F%2Fgraph.microsoft.com%2F.default",
  client_secret: "[MyClientSecret"
}

但是,我遇到此错误:

“ error_description”:“ AADSTS900144:请求正文必须包含 以下参数:“ grant_type”。

有什么办法解决这个问题吗?

1 个答案:

答案 0 :(得分:0)

尝试用邮递员X-www-form-urlencoded。

enter image description here