Postman NTLM Authentication with different users' credentials

I need to send requests with different credentials: one user adds something, another approves.

The problem is that Postman saves somewhere authorization credentials and ignores new credentials that were sent via Authorization tab.

Any ideas?

Hi @elag

Can you try closing the connection once you are done with user1?
This can be done by sending another request to the same endpoint with an extra header Connection: close

I have made a sample collection to demonstrate this. It has 4 requests

  1. A request with NTLM credentials. This should return 200
  2. A request without any credentials. Since the connection was not closed, this will also return 200
  3. A request without any credentials but with the extra header. After this request is made, the connection will be closed but you will still get the 200 status
  4. Again a request (same as 2) without any credentials. Since the connection was closed, this should return 401. In your use-case, this is where you would provide the credentials of user2
    Run in Postman

Hope this helps


Harendra

1 Like

Thank you! It works!

1 Like