Microsoft 365 Integration

General plugins (Local) ::: local_o365
Maintained by Enovation Dev Team, James McQuillan, Zion Brewer, Nima Mojgani
This plugin provides libraries and services that power other Microsoft 365 plugins.
Latest release:
5314 sites
118 fans
Current versions available: 12

Microsoft 365 Plugins for Moodle

Microsoft 365 Integration Local Plugin

This plugin provides libraries and services and power other Microsoft 365 plugins.

This is part of the suite of Microsoft 365 plugins for Moodle.

To follow active development on GitHub, click here.

This plugin is updated with stable Moodle releases. This means:

  • New features, bug fixes for general core bugs, and security issues for all plugin versions for Moodle 3.9.x and earlier versions have ended, with the following exception:
    • Bug fixes for security issues for Moodle 3.9.x versions will end 8 May 2023.
  • For plugin versions for Moodle 3.10:
    • New features and full support until November 2021.
    • Bug fixes for security issues until May 2022.
  • For plugin versions for Moodle 3.11 (to be released in July 2021):
    • New features and full support until May 2022.
    • Bug fixes for security issues until November 2022.


Before we can accept your pull request, you'll need to electronically complete Microsoft's Contributor License Agreement. If you've done this for other Microsoft projects, then you're already covered.

Why a CLA? (from the FSF)


(c) Microsoft, Inc.

Code for this plugin is licensed under the GPLv3 license.

Any Microsoft trademarks and logos included in these plugins are property of Microsoft and should not be reused, redistributed, modified, repurposed, or otherwise altered or used outside of this plugin.


This plugin is part of set Microsoft 365.


Screenshot #0
Screenshot #1
Screenshot #2
Screenshot #3
Screenshot #4
Screenshot #5


Enovation Dev Team (Lead maintainer)
Vinayak (Vin) Bhalerao
Akinsaya Delamarre
Please login to view contributors details and/or to contact them

Comments RSS


  • Wed, May 31, 2017, 9:42 PM
    We are testing the built in OAuth 2 services in Mdl 3.3+, and have gotten the authentication part working with both Office 365 and regular Microsoft accounts. The additional Office 365 plugin-set is offering authentication, Storage sharing/OneDrive, Assignments, OneNote access and Calendar Sync.

    Does the built-in OAuth 2 services support all these features? I can't make the OneDrive repo working, only for the regular Microsoft accounts, in the Mdl docs, it's written that it doesn't work with the API for OneDrive business, that is ok and I've figured that out.
    ..but with this set of plugins, all files are available with the repository-plugin, that's what I want with the built-in OAuth 2 services as well.

    I created a app in Azure, but when I try to authenticate the users, I get a error message saying that the API is not supported. So, is the Office 365 with an app reigstred for all users within an O365-subscription, not supported at all in Mdl 3.3?

    Does somebody here know if it's possible? Will calendar sync, assignments etc.. be available with the built-in OAuth 2 services?
  • Wazza
    Mon, Jul 10, 2017, 7:17 PM
    We get this error:
    Adhoc task failed: local_o365\task\sharepointaccesssync,Fout bij het lezen van de databank
    Debug info:
    Table 'edudelta.mdl_users' doesn't exist
    SELECT id, username FROM mdl_users

    Which is quite logical, as the table name is mdl_user and not mdl_users

    Version, 2016120501

    Does anybody know why it tries to find our user data in mdl_users in stead of mdl_user?
  • Wed, Jul 12, 2017, 8:20 PM
    Dear All,

    Kindly advise on how to prevent creating duplicate account when LDAP and OpenID Connect are enabled on Moodle.

    Thank you for your help.

    Best regards,
  • Mon, Jul 31, 2017, 9:01 AM
    Hi all,
    I'm having issue with getting OneNote Integrate with Moodle. It doesn’t show in Microsoft block and when I add to repository, it gives this error “The OpeID connect authentication plugin or the Microsoft Account local plugin must be configuring to use OneNote Repository”
    I can log on to Moodle with O365 account. However, under Microsoft Office 365 Integration plugin, under “Azure AD Setup” it says Couldn’t check reply url.
    In my Azure ad app I add same reply url as Microsoft Office 365 Integration plugin in Moodle .
    I appreciate any help. Thanks
  • Sun, Aug 27, 2017, 4:41 PM
    Hi, we have Office 365 for Education for staff and students alike, however we do not use Azure AD and all our users are in our 'normal' AD. Would we have to export all users from AD to Azure AD for this SSO to work? Also how do we access the free Azure AD, it appears as if it attempts to bill us. Is there a walkthrough that I can use with our network chaps?

  • Tue, Aug 29, 2017, 8:57 PM

    We have had some problems with the plugin creating cron locks. When we disable the syncronise SDS cronjob, the cronjob are working fine, but if we enable the Syncronice with SDS we get an error saying that: - we cant seem to figure why its locking
  • Fri, Sep 8, 2017, 2:29 PM
    We upgraded to Moodle 3.3.1+ this summer and are using Office 365 SSO plugins. Alls our users are SSO users and since the upgrade, no matter what, when they login their language preference gets reset to 'en'.

    I have manually changed the language to 'nl' via a database query, but since the change happens on login, when they login their language gets reset back to 'en'. This did not happen in our previous version (3.1) where we also userd the SSO plugin through Office365.

    To fix this, I changed line 271 in local/o365/classes/observers.php from

    $updateduser->lang = 'en';


    $updateduser->lang = 'nl';

    It would be nice if this wouldn't happen at all, can you please change to code to change the user lang to respect the site language (moodlecourse | lang) if it is not already set?
  • Tue, Oct 3, 2017, 9:40 PM
    Hi, we have set up the OIDC and it works for admin fine. It works for students if the preventaccountcreation is off but then we get duplicate accounts. It appears that the SDS cron is not running and we get this error if we try and run it manually.

    Execute scheduled task: Sync with SDS (local_o365\feature\sds\task\sync)
    ... started 14:37:06. Current memory use 9.9MB.
    Exception - Argument 1 passed to local_o365\rest\o365api::__construct() must be an instance of local_o365\oauth2\token, null given, called in [dirroot]/local/o365/classes/feature/sds/task/sync.php on line 361

    Anybody got any ideas?



  • Wed, Oct 4, 2017, 6:52 PM

    is this plugin still being developed? Will this plugin be Moodle 3.3 compatible?
  • Fri, Oct 6, 2017, 11:25 PM

    our university is now using Office 365 and we want to give access to OneDrive for business and OneDrive personal to our user. We are using Moodle 3.3 and we noticed that the core plugin now give access to both of them. We also noticed that your documentation still talk about the repository_office 365 plugin.

    My question : Is the repository_office 365 plugin still necessary ? Does it give some extra features that the core plugin does not cover ?


  • Thu, Nov 23, 2017, 10:23 PM
    Hi, I cannot run any cronjobs anymore, getting this:
    Execute scheduled task: Nutzergruppen in Office 365 erstellen (local_o365\task\groupcreate)
    ... started 15:20:36. Current memory use 16.8MB.
    !!! Fehler: Argument 1 passed to local_o365\rest\o365api::__construct() must be an instance of local_o365\oauth2\token, null given, called in [dirroot]/local/o365/classes/feature/usergroups/coursegroups.php on line 393 !!!

    Please help! I just made security updates on the server, nothing else, Moodle does not send notifications any more...THANKS!!!
  • Thu, Nov 23, 2017, 10:36 PM
    ok i disabled sync office365 groups under the settings of the plugin, looks better now, thanks anyway!
  • Tue, Dec 12, 2017, 5:15 PM

    I can't get this plug-in to properly install. When I try installing it, I get a "DDL sql execution error" followed by a long list of debug messages starting with "Debug info: Table 'mdl_local_o365_cronqueue' already exists".

    The Stack trace is:
    line 485 of \lib\dml\moodle_database.php: ddl_change_structure_exception thrown
    line 1000 of \lib\dml\mysqli_native_moodle_database.php: call to moodle_database->query_end()
    line 77 of \lib\ddl\database_manager.php: call to mysqli_native_moodle_database->change_database_structure()
    line 425 of \lib\ddl\database_manager.php: call to database_manager->execute_sql_arr()
    line 370 of \lib\ddl\database_manager.php: call to database_manager->install_from_xmldb_structure()
    line 520 of \lib\upgradelib.php: call to database_manager->install_from_xmldb_file()
    line 1748 of \lib\upgradelib.php: call to upgrade_plugins()
    line 693 of \admin\index.php: call to upgrade_noncore()

    Without this plug-in, I can't use the Office 365 Repository. I am using Moodle 3.2.2

  • Thu, Feb 1, 2018, 8:09 PM
    Tell me please, can i integrate Word to my website - ? I want to make online grammar check at service.
  • Fri, Feb 16, 2018, 5:14 PM
    We are having difficulties with connecting Moodle and Azure (o365). The Azure AD Application reports the error that it could not check the reply url.
    Is this possibly a proxy problem? With other Moodle plugins we faced the problem, that they do not use Moodle's proxy setting. Does this plugin use them, or can they be configured seperately?

Please login to post comments