# Installation

## Windows 10 and 11

#### Installation:

On Windows 10 and Windows 11, OneDrive is usually installed by default. If you can't find it, you can download the application here: [https://www.microsoft.com/en-us/microsoft-365/onedrive/download](https://www.microsoft.com/en-us/microsoft-365/onedrive/download).

#### Configuration:

1. Launch the application by clicking on the icon in your taskbar  
    [![image-1620129804087.png](https://wiki.unil.ch/ci/uploads/images/gallery/2021-05/scaled-1680-/image-1620129804087.png)](https://wiki.unil.ch/ci/uploads/images/gallery/2021-05/image-1620129804087.png)
    
    [![image-1620129837232.png](https://wiki.unil.ch/ci/uploads/images/gallery/2021-05/scaled-1680-/image-1620129837232.png)](https://wiki.unil.ch/ci/uploads/images/gallery/2021-05/image-1620129837232.png)
2. Click on the ***Sign In*** button
    
    [![image-1620129875730.png](https://wiki.unil.ch/ci/uploads/images/gallery/2021-05/scaled-1680-/image-1620129875730.png)](https://wiki.unil.ch/ci/uploads/images/gallery/2021-05/image-1620129875730.png)
3. Enter your **@unil.ch** email address.  
    [![image-1620131755437.png](https://wiki.unil.ch/ci/uploads/images/gallery/2021-05/scaled-1680-/image-1620131755437.png)](https://wiki.unil.ch/ci/uploads/images/gallery/2021-05/image-1620131755437.png)
4. On the page that opens, enter your UNIL credentials (email address **@unil.ch** and UNIL password).
    
    [![image-1620131791738.png](https://wiki.unil.ch/ci/uploads/images/gallery/2021-05/scaled-1680-/image-1620131791738.png)](https://wiki.unil.ch/ci/uploads/images/gallery/2021-05/image-1620131791738.png)
5. If asked to choose the account type, select ***Work or school***.
    
    [![image-1620132694735.png](https://wiki.unil.ch/ci/uploads/images/gallery/2021-05/scaled-1680-/image-1620132694735.png)](https://wiki.unil.ch/ci/uploads/images/gallery/2021-05/image-1620132694735.png)
6. By default, OneDrive syncs a *OneDrive-Université de Lausanne* folder in your user folder. You can modify it if you wish. <span style="color: rgb(186, 55, 42);">Never sync an entire user folder or a folder from another synchronization application (SWITCHdrive, Dropbox, etc.)</span>.  
    [![image-1620133199607.png](https://wiki.unil.ch/ci/uploads/images/gallery/2021-05/scaled-1680-/image-1620133199607.png)](https://wiki.unil.ch/ci/uploads/images/gallery/2021-05/image-1620133199607.png)
7. By default, the folders ***Desktop, Documents***, and ***Pictures*** are synced to OneDrive. You can deselect a folder if you do not want it to be added to OneDrive. Then click ***Continue***.
    
    [![image-1620133232885.png](https://wiki.unil.ch/ci/uploads/images/gallery/2021-05/scaled-1680-/image-1620133232885.png)](https://wiki.unil.ch/ci/uploads/images/gallery/2021-05/image-1620133232885.png)
8. Several explanation screens will appear. Skip them by clicking ***Next***.
9. The final screen allows you to open your synchronization folder and start depositing files. If you chose to sync the Desktop, Documents, and/or Pictures folders, the data loading will start immediately.
    
    [![image-1620133474520.png](https://wiki.unil.ch/ci/uploads/images/gallery/2021-05/scaled-1680-/image-1620133474520.png)](https://wiki.unil.ch/ci/uploads/images/gallery/2021-05/image-1620133474520.png)
10. You can check that your account is configured correctly if the OneDrive icon in the taskbar turns blue.
    
    [![image-1620133529265.png](https://wiki.unil.ch/ci/uploads/images/gallery/2021-05/scaled-1680-/image-1620133529265.png)](https://wiki.unil.ch/ci/uploads/images/gallery/2021-05/image-1620133529265.png)

## macOS

#### Method 1: App Store

OneDrive can be installed from the Apple App Store: [https://apps.apple.com/ch/app/onedrive/id823766827?l=fr&amp;mt=12](https://apps.apple.com/ch/app/onedrive/id823766827?l=fr&mt=12)

[![image-1620655492759.png](https://wiki.unil.ch/ci/uploads/images/gallery/2021-05/scaled-1680-/image-1620655492759.png)](https://wiki.unil.ch/ci/uploads/images/gallery/2021-05/image-1620655492759.png)

#### Method 2: Download

1. Download the installation file here: [OneDrive macOS](https://go.microsoft.com/fwlink/?linkid=823060)
2. Double-click on the installation file.
3. Click *Next* [![image-1635250620571.12.56.png](https://wiki.unil.ch/ci/uploads/images/gallery/2021-10/scaled-1680-/image-1635250620571-12-56.png)](https://wiki.unil.ch/ci/uploads/images/gallery/2021-10/image-1635250620571-12-56.png)
4. Click *Install* [![image-1635250653160.13.13.png](https://wiki.unil.ch/ci/uploads/images/gallery/2021-10/scaled-1680-/image-1635250653160-13-13.png)](https://wiki.unil.ch/ci/uploads/images/gallery/2021-10/image-1635250653160-13-13.png)
5. Enter your computer password and click *Install Software* [![image-1635250691996.13.45.png](https://wiki.unil.ch/ci/uploads/images/gallery/2021-10/scaled-1680-/image-1635250691996-13-45.png)](https://wiki.unil.ch/ci/uploads/images/gallery/2021-10/image-1635250691996-13-45.png)
6. Once the installation is complete, click *Close* [![image-1635250753559.14.07.png](https://wiki.unil.ch/ci/uploads/images/gallery/2021-10/scaled-1680-/image-1635250753559-14-07.png)](https://wiki.unil.ch/ci/uploads/images/gallery/2021-10/image-1635250753559-14-07.png)
7. Launch the application from the *Applications* folder.

### Configuration

1. Enter your UNIL email address  
    [![image-1620655662718.png](https://wiki.unil.ch/ci/uploads/images/gallery/2021-05/scaled-1680-/image-1620655662718.png)](https://wiki.unil.ch/ci/uploads/images/gallery/2021-05/image-1620655662718.png)
2. If asked, choose **Work or school**  
    [![image-1620655754073.png](https://wiki.unil.ch/ci/uploads/images/gallery/2021-05/scaled-1680-/image-1620655754073.png)](https://wiki.unil.ch/ci/uploads/images/gallery/2021-05/image-1620655754073.png)
3. You will then be redirected to the UNIL login page. Enter your UNIL password and click **Sign In**.  
    [![image-1620655794964.png](https://wiki.unil.ch/ci/uploads/images/gallery/2021-05/scaled-1680-/image-1620655794964.png)](https://wiki.unil.ch/ci/uploads/images/gallery/2021-05/image-1620655794964.png)
4. By default, OneDrive syncs a *OneDrive* folder in your user folder. You can modify it if you wish. <span style="color: rgb(186, 55, 42);">**Never sync an entire user folder or a folder from another synchronization application (SWITCHdrive, Dropbox, etc.)**</span>.  
    [![image-1620655840911.png](https://wiki.unil.ch/ci/uploads/images/gallery/2021-05/scaled-1680-/image-1620655840911.png)](https://wiki.unil.ch/ci/uploads/images/gallery/2021-05/image-1620655840911.png)
    
      
    [![image-1620655855190.png](https://wiki.unil.ch/ci/uploads/images/gallery/2021-05/scaled-1680-/image-1620655855190.png)](https://wiki.unil.ch/ci/uploads/images/gallery/2021-05/image-1620655855190.png)
5. Several explanation screens will appear. Skip them by clicking ***Next***
6. The final screen allows you to open your synchronization folder and start depositing files. If you chose to sync the Desktop, Documents, and/or Pictures folders, the data loading will start immediately.

[![image-1620656053940.png](https://wiki.unil.ch/ci/uploads/images/gallery/2021-05/scaled-1680-/image-1620656053940.png)](https://wiki.unil.ch/ci/uploads/images/gallery/2021-05/image-1620656053940.png)

## Linux

<p class="callout info">There is no official OneDrive client for Linux. It is recommended to use the [OneDrive web interface](https://wiki.unil.ch/ci/books/synchronisation-de-fichiers-onedrive/page/interface-web).</p>

You can use an unofficial command-line client for synchronization. For more information, read this [https://askubuntu.com/questions/804301/how-to-sync-onedrive-business-office-365-on-linux](https://askubuntu.com/questions/804301/how-to-sync-onedrive-business-office-365-on-linux), and the link to the project can be found here [https://github.com/abraunegg/onedrive/blob/master/docs/INSTALL.md](https://github.com/abraunegg/onedrive/blob/master/docs/INSTALL.md)

<p class="callout warning">Some Linux distributions seem to offer OneDrive through their package manager, but this version is often not up-to-date. It is advisable to follow the instructions in the GitHub repository below!</p>

### **Ubuntu 20.04**

<p class="callout warning">The simplest solution seems to be [Insync](https://www.insynchq.com/), but it is a paid service!</p>

Add the OneDrive repository to your APT sources:

`sudo vim /etc/apt/sources.list`

Add the following line at the end of the file:

`deb https://download.opensuse.org/repositories/home:/npreining:/debian-ubuntu-onedrive/xUbuntu_20.04/ ./`

<div class="bg-black rounded-md" id="bkmrk-bash"></div>Close Vim (if you don't know how to close Vim, switch to macOS or Windows :))

Download the key for the repo and add it:

```shell
wget https://download.opensuse.org/repositories/home:/npreining:/debian-ubuntu-onedrive/xUbuntu_20.04/Release.key
sudo apt-key add ./Release.key
```

<div class="bg-black rounded-md" id="bkmrk-bash-1"></div><div class="bg-black rounded-md" id="bkmrk-update-apt-and-insta"><div class="p-4 overflow-y-auto">Update APT and install the OneDrive client:</div><div class="p-4 overflow-y-auto">  
</div></div>```shell
sudo apt update
sudo apt install onedrive
```

<div class="bg-black rounded-md" id="bkmrk-bash-2"></div><div class="bg-black rounded-md" id="bkmrk--2"></div>Launch the client to configure it:

```shell
onedrive
```

<div class="bg-black rounded-md" id="bkmrk-bash-3"></div>This will give you:

```shell
Configuring Global Azure AD Endpoints
Authorize this app visiting:

https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&scope=Files.ReadWrite%20Files.ReadWrite.all%20Sites.Read.All%20Sites.ReadWrite.All%20offline_access&response_type=code&redirect_uri=https://login.microsoftonline.com/common/oauth2/nativeclient

Enter the response uri

```

<div class="bg-black rounded-md" id="bkmrk-perl"></div>Click on the URL starting with [http://login.microsoftonline.com](http://login.microsoftonline.com). This will open your browser (or copy/paste it if clicking doesn't work) and log you into your Microsoft M365 account, leading you to a blank page. Copy/paste the URL of this blank page into the terminal and press Enter:

<div class="p-4 overflow-y-auto" id="bkmrk-bash-4"><div class="bg-black rounded-md"><div class="flex items-center relative text-gray-200 bg-gray-800 dark:bg-token-surface-primary px-4 py-2 text-xs font-sans justify-between rounded-t-md">bash</div></div><div class="bg-black rounded-md"><div class="p-4 overflow-y-auto">  
</div></div></div>```shell
Enter the response uri: https://login.microsoftonline.com/common/oauth2/nativeclient?code=[.........]

The application has been successfully authorized; however, no additional command switches were provided.

Please use --help for further assistance regarding running this application.
```

Start syncing with the following command (the `--verbose` switch can be omitted), and your OneDrive files will be synchronized to the `~/OneDrive` directory:

<div class="p-4 overflow-y-auto" id="bkmrk-bash-5"><div class="bg-black rounded-md"><div class="p-4 overflow-y-auto"><div class="p-4 overflow-y-auto"><div class="bg-black rounded-md"><div class="flex items-center relative text-gray-200 bg-gray-800 dark:bg-token-surface-primary px-4 py-2 text-xs font-sans justify-between rounded-t-md">bash</div></div><div class="bg-black rounded-md"><div class="p-4 overflow-y-auto">  
</div></div></div></div></div></div>```shell
onedrive --synchronize --verbose
```

There is a graphical interface based on this OneDrive version called OneDriveGUI: [https://github.com/bpozdena/OneDriveGUI](https://github.com/bpozdena/OneDriveGUI)

## Mobile Phone and Tablet

### iOS and iPadOS

<div class="p-4 overflow-y-auto" id="bkmrk-go-to-the-app-store-"><div class="bg-black rounded-md"><div class="p-4 overflow-y-auto"><div class="p-4 overflow-y-auto">1. Go to the [App Store](https://apps.apple.com/us/app/microsoft-onedrive/id477537958) and install the **OneDrive** application.
2. Enter your UNIL email address.  
    [![image-1635424149862.jpg](https://wiki.unil.ch/ci/uploads/images/gallery/2021-10/scaled-1680-/image-1635424149862.jpg)](https://wiki.unil.ch/ci/uploads/images/gallery/2021-10/image-1635424149862.jpg)
3. You will be redirected to the UNIL login screen. Enter your UNIL credentials (email and password) and click *Sign In* [![image-1635424288845.jpg](https://wiki.unil.ch/ci/uploads/images/gallery/2021-10/scaled-1680-/image-1635424288845.jpg)](https://wiki.unil.ch/ci/uploads/images/gallery/2021-10/image-1635424288845.jpg)
4. You will then have access to your OneDrive  
    [![image-1635424394453.jpg](https://wiki.unil.ch/ci/uploads/images/gallery/2021-10/scaled-1680-/image-1635424394453.jpg)](https://wiki.unil.ch/ci/uploads/images/gallery/2021-10/image-1635424394453.jpg)

</div></div></div></div>### Android

<div class="p-4 overflow-y-auto" id="bkmrk-go-to-the-google-pla"><div class="bg-black rounded-md"><div class="p-4 overflow-y-auto"><div class="p-4 overflow-y-auto">1. Go to the [Google Play Store](https://play.google.com/store/apps/details?id=com.microsoft.skydrive&hl=en&gl=US) and install the **Microsoft OneDrive** application.
2. Launch the application and select *Sign in* *****[![image-1620135101871.jpg](https://wiki.unil.ch/ci/uploads/images/gallery/2021-05/scaled-1680-/image-1620135101871.jpg)](https://wiki.unil.ch/ci/uploads/images/gallery/2021-05/image-1620135101871.jpg)*****
3. Enter your **@unil.ch** email address and continue  
    [![image-1620135110660.jpg](https://wiki.unil.ch/ci/uploads/images/gallery/2021-05/scaled-1680-/image-1620135110660.jpg)](https://wiki.unil.ch/ci/uploads/images/gallery/2021-05/image-1620135110660.jpg)
4. Select **Sign in to OneDrive For Business** if prompted  
    [![image-1620135129552.jpg](https://wiki.unil.ch/ci/uploads/images/gallery/2021-05/scaled-1680-/image-1620135129552.jpg)](https://wiki.unil.ch/ci/uploads/images/gallery/2021-05/image-1620135129552.jpg)
5. Enter your **@unil.ch** email address and your UNIL password, then click ***Sign In* [![image-1620135196765.jpg](https://wiki.unil.ch/ci/uploads/images/gallery/2021-05/scaled-1680-/image-1620135196765.jpg)](https://wiki.unil.ch/ci/uploads/images/gallery/2021-05/image-1620135196765.jpg)**
6. The final screen after installation  
    [![image-1620135338493.jpg](https://wiki.unil.ch/ci/uploads/images/gallery/2021-05/scaled-1680-/image-1620135338493.jpg)](https://wiki.unil.ch/ci/uploads/images/gallery/2021-05/image-1620135338493.jpg)
7. Click on "Home" to see an overview of your account  
    [![image-1620135420658.jpg](https://wiki.unil.ch/ci/uploads/images/gallery/2021-05/scaled-1680-/image-1620135420658.jpg)](https://wiki.unil.ch/ci/uploads/images/gallery/2021-05/image-1620135420658.jpg)

</div><div class="p-4 overflow-y-auto"></div></div></div></div>