Office 365 REST API Authentication Error RRS feed

  • Question

  • I am having trouble retrieving data using the Office365 API. I have a Java service application which has no user interface which needs to retrieve data from Office365. I registered the app in Azure and received a Client ID and Client Key. I am able to successfully invoke the "https://login.windows.net/<tenant ID>/oauth2/token" URL and receive a valid access token. However, when I then take that access token and add a "Authorization: Bearer <access token>" header and make a call to "https://xyzdomain-my.sharepoint.com/_api/v1.0/me/files/" , I get the following error:

    "x-ms-diagnostics →3001000;reason="There has been an error authenticating the request.";category="invalid_client""

    Any idea how I can resolve this ?

    Tuesday, November 4, 2014 9:50 PM