General plugins (Local): Microsoft Office 365 Integration

Maintained by Picture of James McQuillan James McQuillan, Picture of Zion Brewer Zion Brewer, Picture of Charles Verge Charles Verge, Picture of Nima Mojgani Nima Mojgani
This plugin provides libraries and services that power other Office 365 plugins.
1198 sites
46 fans

Office 365 Plugins for Moodle

Microsoft Office 365 Integration Local Plugin

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

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

This plugin is updated with stable releases. To follow active development on GitHub, click here.


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 Office 365.


Screenshot #0
Screenshot #1
Screenshot #2


Picture of James McQuillan
James McQuillan (Lead maintainer)
Picture of Vinayak (Vin) Bhalerao
Vinayak (Vin) Bhalerao
Picture of Akinsaya Delamarre
Akinsaya Delamarre
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of James McQuillan
    Wed, 29 Mar 2017, 12:49 PM
    @Marie-ange Mhanna Yes SDS is supported as a preview feature by the plugins. From the local plugin settings page (Site Administration > Plugins > Local Plugins > Microsoft Office 365 Integration), you will see a tab that says "School Data Sync". You can configure the integration from there.
  • Picture of Conor Bradley
    Tue, 16 May 2017, 5:20 PM
    Are these plugins compatible with php7?
  • Picture of Memet Ødegaard Cataltepe
    Wed, 31 May 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, 10 Jul 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?
  • Picture of Anis Jradah
    Wed, 12 Jul 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,
  • Picture of Moodle SV
    Mon, 31 Jul 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
  • Picture of Colin Wheelhouse
    Sun, 27 Aug 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?

  • Picture of Henrik sune Pedersen
    Tue, 29 Aug 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
  • Picture of Pieterjan Heyse
    Fri, 8 Sep 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?
  • Picture of Colin Wheelhouse
    Tue, 3 Oct 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?



  • Picture of Urpo Karhula
    Wed, 4 Oct 2017, 6:52 PM

    is this plugin still being developed? Will this plugin be Moodle 3.3 compatible?
  • Picture of Steve Massicotte
    Fri, 6 Oct 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 ?


  • Picture of tamas erdelyi
    Thu, 23 Nov 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!!!
  • Picture of tamas erdelyi
    Thu, 23 Nov 2017, 10:36 PM
    ok i disabled sync office365 groups under the settings of the plugin, looks better now, thanks anyway!
  • Picture of Aaron Johnson
    Tue, 12 Dec 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

1 2 3 4 5 6
Please login to post comments