title: Access Office 365 (sharepoint REST api) in Azure using Java
body: <p>I am new to Azure and sharepoint integration with Java.</p>
  
  <p>I am trying to integrate Java with Sharepoint. The Sharepoint-Office 365 is available in Azure ADFS. I need to write a Java program to authenticate and then access the files using the RESTful APIs provided by Sharepoint. Azure is using WS-Federation authentication process. I have been trying to look for the code that helps me to use the WS-F authentication and then access the files. I am not able to find any useful material. </p>
  
  <p>The basic authentication is not working and I have nor worked in WS-F authentication. So no clue on where to start. I also used the <a href="https://github.com/OfficeDev/Office-365-SDK-for-Java" rel="nofollow noreferrer">Office-365-sdk</a> to do this, but could not do it as it is using the client ID and other attributes which are not relevant to my application. For ex, the client ID is not required as the sharepoint is already available.</p>
  
  <p>I got <a href="http://www.wave-access.com/public_en/blog/2015/june/23/java-service-integration-with-sharepoint-online-via-rest-api.aspx#.WClVQ_l97mE" rel="nofollow noreferrer">this link</a> as well, but some of the methods are missing and it does not explain about the libraries used to achieve. Please guide me in implementing this.</p>