none
Questions about OneDrive authentication code RRS feed

  • Question

  • Hi, we have a backup application (we are resellers) and we need the user to connect this application with his OneDrive account. The user has to select OneDrive as a backup destination, allow the application to access his OneDrive account, get an authentication code and then insert the code in the application.

    We have registered an application in Microsoft Application Registration Portal and configured the backup applicayion settings correctly. However, we have two problems.

    Problem 1: In the Redirect URL we have entered our website's homepage (for testing) and it works almost correct. The user is redirected to our homepage and in the URL there is a code (eg. ourhome.gr/?code=EEEEEEEEEE). I suppose this is the authentication code. How can I make it display on the page? Is there a specific template/code I should use?

    Problem 2: When I copy the code mentioned above and paste it in the backup application, I get the following error: [d] [d.a] failed to get OAuth2Tokens after retrieved from OneDrive, (java.lang.RuntimeException: Failed : HTTP error code: 400), caused by [RuntimeException] Failed : HTTP error code: 400 Why do I get this error? 

    I have read the forums and also contacted the backup application's support team, but I can't find a solution.

    Any help would be much appreciated.  Thank you.

    Thursday, January 25, 2018 7:58 AM

All replies

  • For help with OneDrive development see the OneDrive dev center at https://developer.microsoft.com/en-us/onedrive and the options under the "Support" tab.

    Thursday, January 25, 2018 6:41 PM
  • First of all, I have asked a lot of times at stackoverflow but noone is answering.

    Secondly, I contacted the support team using the live chat at https://developer.microsoft.com/en-us/windows/support and I was told to post a thread in the Windows and Windows phone apps  >  Developing Universal Windows apps forum. Why was my post moved from that forum?

    I have been trying to solve this problem with OneDrive for a long time. Isn't there someone who can tell me how or give me some advice on how to solve my problem?

    Tuesday, January 30, 2018 10:03 AM
  • Hi Dimitra,

    OneDrive configuration and development is off topic in the Developing Universal Windows apps forum. That forum is specifically about writing UWP apps and isn't followed by OneDrive specialists. From your error it looks like you have an Java (Android?) app, not a UWP app.

    I'm not sure why you were directed there. I suspect the person you talked to misunderstood as that team isn't close to OneDrive support but generally works with UWP app publishing.

    Unfortunately, I'm not familiar with OneDrive development and registration, and I don't know who best to talk to beyond the channels documented on OneDrive dev center page. It looks like you've now posted on the [onedrive] tag on Stackoverflow (I don't see any posts prior to this thread though), so I hope that somebody will respond to you there soon.

    Thursday, February 1, 2018 10:25 PM