I have a Java based application which works with the SharePoint 2013 REST service using the Apache HttpClient library which supports, among other methods, NTLM authentication. As I understand it, SharePoint Online supports the same RESTful interface
but I haven't been able to determine how to authenticate against it in order to exercise the same code against a SharePoint Online service. Currently when I try it, I get a 403. When I add X-FORMS_BASED_AUTH_ACCEPTED set to "f" in my
HTTP header, I get a 401. I pass my "onmicrosoft.com" administrative privilege account name and password.
From what I've found so far, it looks like I'll need to contact the associated Azure AD instance acting as an STS and use Claims Based Authentication. I've seen a few examples online for C# based, CSOM using applications but I haven't seen any for
Java or even JavaScript based applications that have been written to use the SharePoint 2013 REST service. Can anyone point me to an example of how to AuthN for SharePoint Online from one of these platforms. I've often extrapolated JavaScript examples
in MSDN documentation if Java is taboo. :)
For my purposes, I will also need to contact the Azure AD instance via LDAP to sync profile type information and ultimately be able to enforce permissions by matching up the SID for any given user. Can the Azure AD instance be configured to listen for LDAP requests?
Thanks,
Tom Doman