Skip to content
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

Update onedrive-authorize #40

Closed
wants to merge 1 commit into from
Closed

Update onedrive-authorize #40

wants to merge 1 commit into from

Conversation

mysoniw
Copy link

@mysoniw mysoniw commented Dec 15, 2016

one drive for personal does not need client secret params

one drive for personal does not need  client secret params
@@ -9,7 +9,7 @@ echo "https://login.live.com/oauth20_authorize.srf?client_id=${api_client_id}&sc
echo ""
echo "When ready, please enter the value of the code parameter (from the URL of the blank page) and press return"
read code
api_json_result=$(curl -s -d "client_id=${api_client_id}&client_secret=${api_client_secret}&code=${code}&grant_type=authorization_code&redirect_uri=https://login.live.com/oauth20_desktop.srf" -X POST "${api_auth_url}")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the official documentation, the parameter client_secret is required: https://dev.onedrive.com/auth/msa_oauth.htm#step-2-redeem-the-code-for-access-tokens

Even though it works without providing the secret, I would leave it there until Microsoft changes the documentation.

@weismat
Copy link

weismat commented Dec 26, 2016

This patch seems to be required now. The current master does not work.

@la-costa
Copy link

la-costa commented Dec 27, 2016

I agree with @weismat, this patch works to me to authorize.
To upload a file, i removed the line 51 of onedrive-base.
However, I was only able to upload by rename.
When I try to upload without rename, I get the message "Folder structure created, no files uploaded".

@fkalis
Copy link
Owner

fkalis commented Dec 28, 2016

Microsoft has two types of applications:

microsoft-apps

The master branch supports only the Live SDK applications for OneDrive Personal. You have to make sure, that your App ID contains no dashes. If it does, you most likely have created a converged application.

If you have created a converged application and try to authorize your app with the script from the master branch, you receive the error "Public clients can't send a client secret.. In this case, you should checkout this feature branch, and follow the instructions from the README file (from that branch).

@fkalis
Copy link
Owner

fkalis commented Dec 28, 2016

After some more testing I will merge the feature branch into the master. That means no more support for the old (deprecated?) Live SDK application, but allows the script to use the new Graph API from Microsoft.

@fkalis fkalis closed this Dec 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants