I'm working on a Java app to access SharePoint 2016 via the REST interface. I've done this before with other SharePoint server versions, but I'm running into something odd this time:
If I make the REST
request in a browser, the data comes back fine.
If the same REST request is used in my app, I authenticate (I'm getting a 200 response and JSON back), but the JSON response does not contain the data:
{"d" : {"results" : [] }}
I am authenticating via NTLM using HttpsURLConnection with GET.
Accept: application/json;odata=verbose
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64;
Trident/5.0)
Content-Type: text/xml; charset=utf-8
Connection: keep-alive
Authentication is handled with the JCIFS library (Using NTLM authentication in Java applications see second answer)
Any thoughts?