'Connection to SSRS API via NTLM : handshake rejected
I try to connect to the SSRS REST API via NTLM and cURL, but the authentication fails.
Here is my attempt:
λ curl --ntlm -v -u localhost\osain http://localhost:8080/reports/api/v2.0/CatalogItems
Enter host password for user 'localhost\osain':
* Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 8080 (#0)
* Server auth using NTLM with user 'localhost\osain'
> GET /reports/api/v2.0/CatalogItems HTTP/1.1
> Host: localhost:8080
> Authorization: NTLM TlRMTVNTUAABAAAAB4IIogAAAAAAAAAAAAAAAAAAAAAKAPBVAAAADw==
> User-Agent: curl/7.55.1
> Accept: */*
>
< HTTP/1.1 401 Unauthorized
< Content-Length: 0
< Server: Microsoft-HTTPAPI/2.0
< WWW-Authenticate: NTLM TlRMTVNTUAACAAAAHgAeADgAAAAFgoqi8RNlChVFdl4AAAAAAAAAAJgAmABWAAAACgDwVQAAAA9EAEUAUwBLAFQATwBQAC0ANQA1AEwATgBMAEoARgACAB4ARABFAFMASwB=
< Date: Wed, 10 Nov 2021 19:15:52 GMT
<
* Connection #0 to host localhost left intact
* Issue another request to this URL: 'http://localhost:8080/reports/api/v2.0/CatalogItems'
* Found bundle for host localhost: 0x1edd3770760 [can pipeline]
* Re-using existing connection! (#0) with host localhost
* Connected to localhost (::1) port 8080 (#0)
* Server auth using NTLM with user 'localhost\osain'
> GET /reports/api/v2.0/CatalogItems HTTP/1.1
> Host: localhost:8080
> Authorization: NTLM TlRMTVNTUAADAAAAGAAYAJIAAAAcARwBqgAAABIAEgBYAAAACgAKAGoAAAAeAB4AdAAAAAAAAADGAQAABYKIogoA8FUAAAAPBGlQjl35BbQdLJKIbG5wZGwAbwBjAGEAbABoAG=
> User-Agent: curl/7.55.1
> Accept: */*
>
< HTTP/1.1 401 Unauthorized
< Content-Length: 0
< Server: Microsoft-HTTPAPI/2.0
* NTLM handshake rejected
* Authentication problem. Ignoring this.
< WWW-Authenticate: NTLM
< Date: Wed, 10 Nov 2021 19:15:52 GMT
<
* Connection #0 to host localhost left intact
The login/password are windows credentials. If I enter this URI in a browser: http://localhost:8080/reports/api/v2.0/CatalogItems , I get a valid answer. But I can't use this as I would like to play with the SSRS API, and I can't do this with a browser(I need to make GET and POST requests, with parameters and so on).
Here is my SSRS security settings in SQL Server Management Studio (SSMS):
Thank you
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|