I create the provider hosted app for SharePoint online. The code is written in java. I follow the below page to get access token before making REST call to SP api.
http://msdn.microsoft.com/en-us/library/office/jj687470(v=office.15).aspx
At the step #6 in the above article
The app uses the authorization code to request an access token from ACS, which validates the request, invalidates the authorization code, and then sends access and refresh tokens to the app.
I've passed all the request parameters correctly and make post to ACS service URL
https://accounts.accesscontrol.windows.net/<<tenant_id>>/tokens/OAuth/2
But I got 400 status response from the ACS server. I use this same approach with code written in C# it works properly
Can anyone help me with these questions?
- If I want to see detail log of accounts.accesscontrol.windows.net like what parameters are invalid or why my request from java client is bad? How can I do this?
- Any way to debug on the service side accounts.accesscontrol.windows.net
- Is there any existing library in java can help to achieve this goal?