相关文章推荐
想表白的紫菜汤  ·  Spring MVC 和 WebFlux ...·  1 年前    · 
风流的火柴  ·  【转载】 ...·  1 年前    · 
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

Graph API authentication | The request body must contain the following parameter 'grant_type'

Ask Question

I'm trying to authenticate to Graph using Postman. I have the following request:

Type: Post Url: https://login.microsoftonline.com/[MyTenantIdHere]/oauth2/v2.0/token

Body = Raw:

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

However, I'm getting this error:

"error_description": "AADSTS900144: The request body must contain the following parameter: 'grant_type'.

Any idea how to solve this?

can you please try with curl curl -X POST -d “grant_type=client_credentials&client_id=clientid&client_secret=secret&scope= https%3A%2F%2Fgraph.microsoft.com%2F.default” https://login.microsoftonline.com/tenantid/oauth2/v2.0/token and let us know if it helps. Sruthi J Sep 10, 2020 at 17:50

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question . Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers .