We can authenticate SP Online sites via clientid/client secret and generate access token. How can we authenticate in on-prem environment?

We don't want to pass username/password to authenticate the SP site. Multiple articles are found for Online sites, but no pointers for SP OnPrem.

Please assist.


You can enable Basic Authentification in IIS Settings, then in postman, Authorization --> select Basic Auth type and set your account name and password.


The above approach will not work until you are passing credentials or the authentication token in the request. We have another one, Request digest value is used only to prevent the cross-site scripting and not to authenticate the user.

To authenticate the current logged-in user then you have to send one more header to the request to pass the credentials as:

 xhrFields: { withCredentials: true }

And also you have to enable the URL Rewrite option in the IIS to prevent the preflight option from getting dropped. Please refer this LINK to get it done.

If the above approaches, doesn't help you, then kindly refer the below links,

  1. How to perform POST operations in SharePoint 2013 using REST API from external Application

  2. Authenticating to SharePoint from fiddler/postman fails with 401

  • Did this help you? Jan 17 '20 at 6:13
  • 1
    This is the fix I have been searching for for several years. I can now ditch the old chrome app and just use the stand alone postman app with on-prem SharePoint. Thank you! Nov 23 at 19:56

Postman has NTLM in "beta" and it doesn't work. Insomina does NTLM without issues. I have used Insomnia to authenticate and make API Rest calls for SP2013 on prem without issue. You need to ensure that you are using the x-request-digest value for post calls.


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.