How to Upload Files to OneDrive with CLI

FileZilla Pro Command Line supports OneDrive Personal and OneDrive for Business and
Sharepoint.

What you’ll need

  • A OneDrive account
  • Your OneDrive login details (these will usually be the same as your Microsoft login)
  • For OneDrive for Business and Sharepoint your account is provided by your organization
    administrator

Connecting to OneDrive

Use the onedrive protocol and connect to the graph.microsoft.com host:

    From the prompt enter the connect command:

      fzcli> connect onedrive://user-id@graph.microsoft.com<path>

      fzcli> connect onedrive://demouser@outlook.com@graph.microsoft.
      ˓→com

    Optionally you can use the parameters of the connect command:

      fzcli> connect --protocol onedrive --user <user-id> --path <path>
      graph.microsoft.com

    Note that the path is optional but if present it has to start with a slash.

    An authorization URL is shown. Open the authorization URL in a browser and
    follow the steps to authorize FileZilla Pro Command Line.

    An authorization code is generated in the browser. Copy the code in the prompt.

    Listing the root directory shows the virtual folders:

      My Drives
      Shared with me

    You can now transfer files between your local machine and your Microsoft OneDrive account.

Tags: , , , ,