curlldapservicenow-rest-api

curl authentication with ldap credentials


I am trying to connect to servicenow server with curl which uses ldap authentication.

my command:

curl -ntlm -u user https://my.service-now.com/api/now/table/incident

Then I got:

Enter host password for user 'user':
{"error":{"message":"User Not Authenticated","detail":"Required to provide Auth information"},"status":"failure"}

How can I get authentication by curl command?


Solution

  • You can try this to authenticate:

    curl -ntlm "https://my.service-now.com/api/now/table/incident" --user 'user':'user_password'
    

    Replace with your user Id and password to execute it