A. Instalar el paquete onedrive.
El paquete onedrive viene incluido en los repositorios de Ubuntu, sin embargo la versión disponible no es la mas reciente y ya no funciona de acuerdo a la documentación del repositorio del software.
Es por esto que el desarrollador dispone de un método de instalación alternativo, utilizando la versión de onedrive disponible en los repositorios de OpenSuSE.
1. Agregar el repository release key de OpenSuSE Build Service.
wget -qO - https://download.opensuse.org/repositories/home:/npreining:/debian-ubuntu-onedrive/xUbuntu_20.04/Release.key | sudo apt-key add -
2. Agregar el repositorio de OpenSuSE Build Service, pero acotado al paquete onedrive.
echo 'deb https://download.opensuse.org/repositories/home:/npreining:/debian-ubuntu-onedrive/xUbuntu_20.04/ ./' | sudo tee /etc/apt/sources.list.d/onedrive.list
3. Actualizar el caché de apt.
sudo apt update
4. Instalar el paquete onedrive.
sudo apt install onedrive
B. Configurar el cliente.
1. Crear carpeta /etc/onedrive.
sudo mkdir /etc/onedrive
2. Crear archivo de configuración vacío.
sudo touch /etc/onedrive/config
3. Abrir el archivo de configuración.
sudo nano /etc/onedrive/config
Y agregar las siguientes líneas.
# Configuration for OneDrive Linux Client
# This file contains the list of supported configuration fields
# with their default values.
# All values need to be enclosed in quotes
# When changing a config option below, remove the '#' from the start of the line
# For explanations of all config options below see docs/USAGE.md or the man page.
#
# sync_dir = "~/OneDrive"
# skip_file = "~*|.~*|*.tmp"
# monitor_interval = "300"
# skip_dir = ""
# log_dir = "/var/log/onedrive/"
# drive_id = ""
# upload_only = "false"
# check_nomount = "false"
# check_nosync = "false"
# download_only = "false"
# disable_notifications = "false"
# disable_upload_validation = "false"
# enable_logging = "false"
# force_http_2 = "false"
# local_first = "false"
# no_remote_delete = "false"
# skip_symlinks = "false"
# debug_https = "false"
# skip_dotfiles = "false"
# dry_run = "false"
# min_notify_changes = "5"
# monitor_log_frequency = "5"
# monitor_fullscan_frequency = "10"
# sync_root_files = "false"
# classify_as_big_delete = "1000"
# user_agent = ""
# remove_source_files = "false"
# skip_dir_strict_match = "false"
# application_id = ""
# resync = "false"
# resync_auth = "false"
# bypass_data_preservation = "false"
# azure_ad_endpoint = ""
# azure_tenant_id = "common"
# sync_business_shared_folders = "false"
# sync_dir_permissions = "700"
# sync_file_permissions = "600"
# rate_limit = "131072"
# operation_timeout = "3600"
# webhook_enabled = "false"
# webhook_public_url = ""
# webhook_listening_host = ""
# webhook_listening_port = "8888"
# webhook_expiration_interval = "86400"
# webhook_renewal_interval = "43200"
4. Iniciar la vinculación del cliente con una cuenta de Microsoft.
sudo onedrive
El comando retorna un link que debe ser visitado mediante un navegador.
Authorize this app visiting:
https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=22c49a0d-d21c-4792-aed1-8f163c982546&scope=Files.ReadWrite%20Files.ReadWrite.all%20Sites.ReadWrite.All%20offline_access&response_type=code&redirect_uri=https://login.microsoftonline.com/common/oauth2/nativeclient
Se abrirá el login de Microsoft Account y se deberá iniciar sesión con una cuenta de Microsoft.

5. Luego del login, se abrirá una página en blanco. Se debe copiar la URL de la página de respuesta.

6. Pegar la URL de respuesta en el cliente.
Enter the response uri: https://login.microsoftonline.com/common/oauth2/nativeclient?code=M.R3_BAY.78b5aa2e-3675-1e3e-0f74
Application has been successfully authorised, however no additional command switches were provided.
Please use --help for further assistance in regards to running this application.
7. Probar la sincronización de prueba.
sudo onedrive --dry-run
Resultado:
System configuration file successfully loaded
DRY-RUN Configured. Output below shows what 'would' have occurred.
Configuring Global Azure AD Endpoints
--synchronize or --monitor switches missing from your command line input. Please add one (not both) of these switches to your command line or use --help for further assistance.
No OneDrive sync will be performed without one of these two arguments being present.
8. El detalle de como configurar el cliente mediante el archivo de configuración se puede encontrar en el siguiente link:
https://github.com/abraunegg/onedrive/blob/master/docs/USAGE.md
C. Iniciar el cliente como servicio del sistema.
1. Crear un archivo de servicio vacío en /etc/systemd/system.
sudo touch /etc/systemd/system/onedrive.service
2. Abrir el archivo del servicio vacío.
sudo nano /etc/systemd/system/onedrive.service
3. Pegar las siguientes líneas en el archivo y guardar los cambios.
[Unit]
Description=OneDrive Free Client
Documentation=https://github.com/abraunegg/onedrive
After=network-online.target
Wants=network-online.target
[Service]
ProtectSystem=full
ProtectHostname=true
ProtectKernelTunables=true
ProtectControlGroups=true
RestrictRealtime=true
ExecStart=/usr/bin/onedrive --monitor
Restart=on-failure
RestartSec=3
RestartPreventExitStatus=3
[Install]
WantedBy=default.target
4. Habilitar el servicio onedrive.
sudo systemctl enable onedrive.service
5. Iniciar el servicio onedrive.
sudo systemctl start onedrive.service
6. Comprobar que el servicio se ejecuta correctamente.
sudo systemctl status onedrive.service

Finalmente solo resta comprobar que la sincronización se realiza automáticamente después de un reinicio del servidor.
Páginas de referencia: