System Center Orchestrator (SCORCH) Web Service - Need to authenticate in a curl command and getting 401
Hello!
I'm trying to use the /Orchestrator2012/Orchestrator.svc http request in a curl command.
The username being passed is the account on the Runbook service.
Here are the command and results:
curl -k -v -H "Accept:application/json" -u username:password -X Get http://myserver.com:81/Orchestrator2012/Orchestrator.svc/Runbooks
- About to connect() to myserver.com port 81 (#0)
- Trying 10.10.10.10...
- Connected to myserver.com (10.10.10.10) port 81 (#0)
- Server auth using Basic with user 'username'
Get /Orchestrator2012/Orchestrator.svc/Runbooks HTTP/1.1
Authorization: Basic XXXXXXXXXXXXXXXXXXXXXX
User-Agent: curl/7.29.0
Host: myserver.com:81
Accept:application/json
>
< HTTP/1.1 401 Unauthorized
< Content-Type: text/html
< Server: Microsoft-IIS/10.0
< WWW-Authenticate: Negotiate
< WWW-Authenticate: NTLM
< X-Powered-By: ASP.NET
< Date: Mon, 19 Jul 2021 14:25:48 GMT
< Content-Length: 1293
I tried adding '--ntlm --negotiate', but still got a 401:
< HTTP/1.1 401 Unauthorized
< Content-Type: text/html
< Server: Microsoft-IIS/8.5
* gss_init_sec_context() failed: : No Kerberos credentials available (default cache: KEYRING:persistent:158572)
< WWW-Authenticate: Negotiate
< WWW-Authenticate: NTLM
< X-Powered-By: ASP.NET
< Date: Mon, 19 Jul 2021 15:24:14 GMT
< Content-Length: 1293
I get back the data when I login in under the same username and run the commands (like Get-OrchestratorRunbook) in a powershell script using OrchestratorServiceModule.psm1.
Is there a way to authenticate this http request without using programming like powershell?
Thanks for any help!