Please let me know what is the authentication method we should use when working with OneDrive REST APIs. Is it AZURE AD using the URL https://login.windows.net/common/oauth2/authorize? Or the https://login.live.com/oauth20_authorize.srf?
I'm trying to make a simple call to the new OneDrive REST API (I'm using Azure AD, but not sure if this is the correct Authentication method). I'm using Postman rest client to send the request. I have registered my application in Azure AD and given it full permissions to 'Office 365 SharePoint Online'. I can successfully get an authorization token using the clientId generated in Azure AD. However when I attempt to list files using following request using the access token I get the following error. Could you please let me know what could be the issue?
RESOURCE HTTP GET:
URL: https://-my.sharepoint.com/personal//_api/Files HEADER: Authorization: Bearer
Response:
3001000;reason="There has been an error authenticating the request.";category="invalid_client"