1

I am trying to follow the guidance in many articles, one by Fabian williams, on how to make queries from Fiddler or Postman, but I keep getting 401 unauthorized. I have SharePoint on prem 2016, with Feature pack 2.

I am trying to make a post request, to a url that looks like this:

http://devserver/sites/hr/_api/contextinfo

in Postman, I added the authorization as basic auth, with my username and password, which added the Authorization header for me, and Accept: application/json;odata=verbose;

When I try to make the request, I get 401 unauthorized.

Here's how my request looks like in Postman:

enter image description here

Any help is appreciated.

Thanks.

  • Use NTLM as your auth mechanism. – Trevor Seward Feb 23 at 16:47
  • I tried to do that, didn't work. – Brittany Rutherford Feb 23 at 17:23
  • @TrevorSeward do I need to be signed in with the same user I have access to in SharePoint? For example, I am signed to my computer with a local user, but connecting to sharepoint with a domain user. – Brittany Rutherford Feb 24 at 0:23
  • With Postman, you can pass arbitrary credentials. But you should make sure your username is just the sAMAccountName and the Domain box is filled with your domain's FQDN (e.g. corp.example.com). – Trevor Seward Feb 25 at 16:08
  • @TrevorSeward I tried that, it doesn't work. I saw some examples requiring me to do a POST request to the contextapi end point in order to generate access token, but that request itself isn't authorized. What am I missing? – Brittany Rutherford Feb 26 at 7:55
0

Dont forget to use BearerToken from authentication request to the Data request.

Hope it helps!

0

Within Fiddler is an option to "Automatically Authenticate" and it works beautifully.

You'll still have to call the contextinfo and copy and paste the digest into your call using the X-RequestDigest header

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.