1

What tool should I be using to inspect the JSON data returned as a result of making a rest api call to the sharepoint online or Office365 site. The browsers return xml and I am having issues using fiddler. It comes back with error messages about authentication or permission denied.

3

Login with the credentials of SharePoint tenancy and make sure your user is authenticated to do the operation. I prefer chrome to this operation and recommend to use "Advanced REST client" or Postman REST extension. Finally, make sure your request headers are used accordingly.

'Accept': 'application/json;odata=verbose',
'Content-Type': 'application/json;odata=verbose',
'X-RequestDigest': xx,
'X-HTTP-Method': 'xx',
'If-Match': "xx"

This should work and if this helped, dont forget to mark which make others life easy.

1

You can use following tools in Chrome.

To view data as JSON set following header.

enter image description here

PS: Don't forget to login into you site from Chrome.

  • I have tried them in the past and did it again at your suggestion, but am getting 403 Forbidden error: "The request was a legal request, but the server is refusing to respond to it. Unlike a 401 Unauthorized response, authenticating will make no difference". The JSON returned is as follows: { "error": { "code": "-2147024891, System.UnauthorizedAccessException", "message": { "lang": "en-US", "value": "Access denied. You do not have permission to perform this action or access this resource." } } } – Aamir Jun 2 '16 at 6:01
  • Which one are you using? Advance rest client has been changed. Use post man. Before sending any request, login in your site – Atish Dipongkor - MVP Jun 2 '16 at 6:04
0

Thanks for all the responses, however I have not heard from anyone about installing and enabling the "Postman Interceptor" (for Postman) or "ARC Cookie Exchanger" for Advanced REST Client. Without enabling these Chrome extensions the authenticaton will not work even if I had logged on the 0365 site in Chrome. Following are the screenshots from both pages on how to enable them:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.