-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Connect onedrive return bad request #2314
Comments
In the Azure portal under App registrations, try setting up the callback as domain.com/connect/microsoft/callback. I found I had to choose the "Web" style redirect URI for the authorization code flow. (If you choose PWA then you'll get a PKCE error). More background at https://docs.microsoft.com/en-us/onedrive/developer/rest-api/getting-started/graph-oauth?view=odsp-graph-online#code-flow. |
@thmclellan Thanks for your reply. Under my registered application, I have gone to the authorization and add the web redirect uri domain.com/connect/microsoft/callback, but it still shows bad request after authorization. Are there any other settings? |
@neal-learnformula After a lot of troubleshooting I was able to get it working yesterday running on a Heroku server (running standalone companion similar to the example), but I had errors when running the companion server on localhost, I might have misconfigured it. I found it helped to set COMPANION_DEBUG=true, look for hints in the companion server logs, and to run Chrome Network tools to watch the step by step going through the authorization code flow. This article was also useful: https://developer.okta.com/blog/2018/04/10/oauth-authorization-code-grant-type On the Azure portal, under the web URI redirect configuration, I have these settings. Hope that helps - good luck! |
@thmclellan Thank you so much for your help and hope it's working this time. |
I try to upload documents from onedrive, after authorization, it will redirect to the page "~/onedrive/callback" and the page shows "bad requset". I have already registered my app and added the callback url as oauth redirect uri on the Microsoft account. Also I can successfully connect to google and dropbox.
The text was updated successfully, but these errors were encountered: