skilion / onedrive

Free Client for OneDrive on Linux
GNU General Public License v3.0
4.01k stars 348 forks source link

How to login to sharepoint with command on linux machine #544

Open maiductuan opened 2 years ago

maiductuan commented 2 years ago

How to login to sharepoint with command on linux machine, I can't remote into virtual machine, can only ssh -----------------------------------------log------------------------- Loading config ... No config file found, using defaults Initializing the OneDrive API ... Authorize this app visiting:

Invalid uri Could not initialize the OneDrive API https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=22c49a0d-d21c-4792-aed1-8f163c982546&scope=files.readwrite%20files.readwrite.all%20offline_access&response_type=code&redirect_uri=https://login.microsoftonline.com/common/oauth2/nativeclient

Enter the response uri: ERROR: script returned exit code 1 Finished: FAILURE

abraunegg commented 2 years ago

@maiductuan

How to login to sharepoint with command on linux machine

The 'skilion' onedrive client does not support SharePoint. To sync SharePoint data you need to use https://github.com/abraunegg/onedrive

Major Differences / Enhancements:

I can't remote into virtual machine, can only ssh

You do not need remote graphical display. The authentication URL you are given, you can use on any other system | browser to obtain the response URI - which you can then paste back into your SSH connection where the application is waiting for your response.

You can also present the authentication response as a key value pair, where the application waits for the file containing your response, then reads that authentication response from that file:

--auth-files ARG
      Perform authorization via two files passed in as ARG in the format `authUrl:responseUrl`
      The authorization URL is written to the `authUrl`, then onedrive waits for the file `responseUrl`
      to be present, and reads the response from that file.