Blog Post

Nonprofit Techies
2 MIN READ

Integrating OneDrive with Moodle: A Step-by-Step Guide

TaylorTech's avatar
TaylorTech
Icon for Microsoft rankMicrosoft
Jun 09, 2025

Introduction

Integrating OneDrive with Moodle allows educators and students to seamlessly store, access, and share documents within the Moodle learning environment. By leveraging OneDrive’s cloud storage, institutions can enhance collaboration and resource management. This guide provides detailed steps to integrate OneDrive with Moodle.

Prerequisites

Before starting, ensure the following:

  • You have administrative access to your Moodle instance.
  • You have an active Microsoft 365 account with OneDrive.
  • Your Moodle site supports OAuth 2 authentication.
  • The OneDrive repository plugin is enabled in Moodle.

Step 1: Enable OAuth 2 Authentication in Moodle

  1. Log in to Moodle as an admin.
  2. Navigate to Site administration > Server > OAuth 2 services.

     

  3. Click Create a new service and select Microsoft.

     

  4. Enter a name (e.g., OneDrive Integration).

     

  5. Copy the Redirect URL displayed on the screen (needed for the next step).

Step 2: Register Moodle in Azure Active Directory

  1. Go to the Microsoft Entra Admin Center.
  2. Select App registrations > New registration.

     

  3. Enter a name for the app (e.g., Moodle OneDrive Integration).
  4. Set the Supported account types to Accounts in this organizational directory only.
  5. In the Redirect URI section, select Web and paste the URL copied from Moodle.
  6. Click Register.
  7. Copy the Application (client) ID and Directory (tenant) ID.
  8. Navigate to Certificates & secrets > New client secret, enter a description, select an expiry duration, and copy the secret value.

     

Step 3: Configure OAuth 2 in Moodle

  1. Return to OAuth 2 services in Moodle.
  2. Click on the Microsoft service you created.
  3. Paste the Application ID, Client secret, and Tenant ID.

     

  4. Save the settings.
  5. Click Test connection to ensure it works.

Step 4: Enable the OneDrive Repository Plugin

  1. Navigate to Site administration > Plugins > Repositories.
  2. Locate OneDrive and click Enable.
  3. Click Settings and select the Microsoft OAuth 2 service created earlier.
  4. Save changes.

Step 5: Test OneDrive Integration

  1. Log in to Moodle as a teacher or student.
  2. Go to a course and open the File picker.
  3. Select OneDrive from the available repositories.
  4. Authenticate with a Microsoft 365 account.
  5. Browse and select a file to insert into Moodle.

Conclusion

By following these steps, you have successfully integrated OneDrive with Moodle, providing a streamlined document management experience. This setup enables users to store and access files securely, promoting collaboration within the learning platform.

Updated Jun 05, 2025
Version 1.0
No CommentsBe the first to comment