0
votes

I wanted to try out Sharepoint integration with Postman. So, I was following the steps given in the below article: https://medium.com/@anoopt/accessing-sharepoint-data-using-postman-sharepoint-rest-api-76b70630bcbf. I followed all the steps exactly as to how it is mentioned in the article. So I created the following:

https://accounts.accesscontrol.windows.net/{{realm}}/tokens/OAuth/2
  • Entered the key value pairs in body and javascript in Test and clicked on Send.

    When I click on Send, I am getting the below error: Error

      {"error":"invalid_request","error_description":"AADSTS900023: Specified tenant identifier '{{realm}}' is neither a valid DNS name, nor a valid external domain.\r\nTrace ID: af51e70f-4f1d-4b25-8112-d800d1a2e600\r\nCorrelation ID: d92a6863-6cba-4c84-8569-135bfabbaf91\r\nTimestamp: 2021-02-05 03:04:37Z","error_codes":[900023],"timestamp":"2021-02-05 03:04:37Z","trace_id":"af51e70f-4f1d-4b25-8112-d800d1a2e600","correlation_id":"d92a6863-6cba-4c84-8569-135bfabbaf91","error_uri":"https://accounts.accesscontrol.windows.net/error?code=900023"}
    
1
Please, may you share more details of this question, for example, send a image of postman and blur all sensitive information. - Antonio Leonardo
@AntonioLeonardo I have added the images. Please let me know if I have missed anything. For the principal parameter I've used "00000003-0000-0ff1-ce00-000000000000" from this link: docs.microsoft.com/en-us/archive/blogs/kaevans/… - Krishnamurthy

1 Answers

0
votes

After spending so much time on the issue, I realized that the body should use the form-data rather than x-www-form-urlencoded. After using form-data and when I clicked on the Send button, I was able to get the success token correctly in my environmental variable.

Click here to view the image