Accessing Dynamics 365 API using Postman

安稳与你 提交于 2020-04-30 08:27:44

问题


I am trying to make an API request against a Dynamics 365 API account using Postman. I have the following credentials but I do not know what headers to use to authenticate.

I have the following ...

  1. Consumer Key
  2. Consumer Secret
  3. Redirect Uri
  4. Authorize Redirect URL
  5. HTTP Method = POST
  6. Access Token Service Endpoint

What headers do I need to set in Postman to get access to the API?

I have read articles and seen some examples but they all have different data than I do. For example in the screen capture below there is a username and password in addition to a Consumer Key (client_id) and Consumer Secret (client_secret).

I do understand that I need to obtain a Bearer token first before making the API call. It is obtaining this token that is confusing me.


回答1:


Simply follow this documentation to setup the Postman for Dynamics web API, even the ready-made clientid = 51f81489-12ee-4a9e-aaae-a2591f45987d will work for any CRM online instance for testing purpose. You can use your customer provided clientid as well.

url should be https://crmdev.crm.dynamics.com
authurl should be https://login.microsoftonline.com/common/oauth2/authorize?resource={{url}}

First create an environment in Postman:

Use OAuth 2.0 in Authorization tab, and Get New Access Token.



来源:https://stackoverflow.com/questions/60192150/accessing-dynamics-365-api-using-postman

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!