Authentication: OpenID Connect

Maintained by Picture of Enovation Dev TeamEnovation Dev Team, Picture of James McQuillanJames McQuillan, Picture of Zion BrewerZion Brewer, Picture of Nima MojganiNima Mojgani
The OpenID Connect plugin provides single-sign-on functionality using configurable identity providers.
4512 sites
58 fans
Current versions available: 12

OpenID Connect Authentication Plugin

The OpenID Connect plugin provides single-sign-on functionality using configurable identity providers, including Azure Active Directory. It is used as part of the Office 365 suite of plugins to connect to Azure Active Directory, but can be configured to provide SSO for other OpenID Connect providers as well.

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


Picture of Enovation Dev Team
Enovation Dev Team (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 Anderson Hsu
    Sat, Aug 12, 2017, 9:23 PM
    Can we use the plugin for SSO with confluence and moodle ? We try to find singal sign on plugin for confluence and moodle . Thanks a lot.
  • Picture of W Roes
    Wed, Nov 8, 2017, 5:57 PM
    What happens if a username (upn) is updated in ADFS? As far as I can see in loginflow/authcode.php/handlelogin it then tries to login with the old username even though this was updated in Moodle as well.

  • Picture of A Guy
    Tue, Mar 13, 2018, 6:18 AM
    We have Moodle 2.7. I've installed your plugin. But when I click on the OpenID Connect icon on the login page I get
    [12-Mar-2018 21:31:10 UTC] Default exception handler: Error in OpenID Connect. Please check logs for more information. Debug:
    Error code: erroroidccall
    * line 47 of /auth/oidc/classes/utils.php: moodle_exception thrown
    * line 252 of /auth/oidc/classes/oidcclient.php: call to auth_oidc\utils::process_json_response()
    * line 177 of /auth/oidc/classes/loginflow/authcode.php: call to auth_oidc\oidcclient->tokenrequest()
    * line 84 of /auth/oidc/classes/loginflow/authcode.php: call to auth_oidc\loginflow\authcode->handleauthresponse()
    * line 105 of /auth/oidc/auth.php: call to auth_oidc\loginflow\authcode->handleredirect()
    * line 29 of /auth/oidc/index.php: call to auth_plugin_oidc->handleredirect()

    It looks like in utils.php there is a NULL value. Where do I start debugging this?
  • Picture of Troy May
    Thu, Apr 5, 2018, 3:16 AM
    How can I add a regular expression to the OpenID Connect User Restrictions field? I have added and so only those with a email address can use the SSO access. But both times I get an error:

    This site has restrictions in place on the users that can log in with OpenID Connect. These restrictions currently prevent you from completing this login attempt.

    We are using an Identity Server 4. Should this parameter be established there or can we just do it at the LMS?
  • Picture of Gustė Briedytė
    Wed, May 23, 2018, 8:19 PM
    I'm facing basically the same problem as @A Guy , only difference being authcode.php seems to have gotten an extra 21 lines on my system. Does anyone have any thoughts, ideas, suggestions?
  • Picture of Stead Halstead
    Sat, Jun 9, 2018, 12:48 AM
    Hello! We're all good to go with the plugins - when we use the csv method of bulk connecting moodle accounts to office365, all is great.

    We're trying to figure out creation of new user accounts. We do not have the auto create account setting turned on (currently set to prevent) because we have some AD users that should not be able to sign into moodle. When we create a new account and tell it to use Open ID connect, the user gets "Invalid login: User not found in Moodle. If this site has the "authpreventaccountcreation" setting enabled, this may mean you need an administrator to create an account for you first." when the attempt to sign in with the Open ID link to Office 365.

    Is there a process by which newly created accounts can be automatically connected to Office 365/moodle accounts? The email address & username is the same. In this example, is the O365 account, the moodle user is steadstudent1.

  • Picture of Rein Laaneser
    Fri, Aug 17, 2018, 4:31 PM
    Hello contributors.

    Please can you help to find Microsoft Official Documentation to create similiar AAD authentication plugin like this.

    We website where we need to log in in similar conditions like this plugin. What we need is proper documentation link to this.

    Thank you for your help.

    EMKTS Seminary

  • You either love it or you hate it
    Wed, Oct 3, 2018, 2:52 PM
    Can we lock user profile fields? As i cant find out where to do this or could we lock them using roles
  • Picture of Eric Breton
    Fri, Apr 12, 2019, 10:39 PM
    Hello, can you tell us if the plugin will support version 3.6 of Moodle in a near future ?
  • Picture of Daniel Neis Araujo
    Thu, Jun 6, 2019, 2:20 AM
    What about support for 3.7?
  • Picture of Joshua Brewer
    Tue, Jul 30, 2019, 3:29 AM
    Yes, please 3.7
  • Picture of Jörg Tuttas
    Tue, Aug 20, 2019, 4:44 PM
    Hello, we are a big vocational school in Germany and uses LDAP for our pupil to sign into Moodle. Now we used the Office365 Plugins to use OneDrive as a repository.

    Now we have the problem if a user connect their account with the office365 account they were connected via the OpenID Connect and we lost them for our LDAP subscription (with the groups etc).

    So is there a way to use the Office365 Plugins without OpenID connect, so that our students can use the office 365 integration and stay for our ldap subscription?

    Looking forward to hear from you, thanks in advance

    best regards

  • Picture of Martin Steinharst
    Tue, Jan 28, 2020, 2:27 PM
    Hello community and developers,

    I have upgraded my moodle instance from version 3.7 to 3.8 including the some plugins.
    Afterwards, I logged in with the admin user. Working.

    Then checked a test user login, which was created and regularly synced with the plugin auth_oidc from Azure.
    That doesn't work. I can create local users and login, but not with the users created and synced from Azure. (my problem)

    I made a health check at Website-Administration -> Plugins -> local plugins -> Office365-Integration -> Advanced.
    It replies: Office 365 API calls are executing at full speed.

    I reran Azure-Setup within moodle, which states:
    - Unified API is active
    - Application Permissions Correct
    - Permissions Correct

    I syncronised users manually under scheduled tasks.
    And received .... Could not assign user "user@domain.tld" Reason: No token available for usersync
    Here may be my problem.

    I cleaned OpenID Connect Tokens.
    And checked Azure App-Registration within Microsoft Backend, which also seems fine.

    I am a little lost now and ask you for help.

    - Is this plugin with v3.7 still working with an v3.8 instance?
    - And, does anyone have suggestions on the "auth_oidc" plugin issue and how to solve it?

    Thanks to you all!

  • Picture of Martin Blackburn
    Tue, Jul 7, 2020, 9:05 PM
    Hi, using OpenId Connect to authenticate to Moodle. It's working but the email field is replace with the UPN every time I log on. Any idea why?
    By the way, great plugin, easy to use.
  • Picture of Arun Kumar M
    Fri, Jul 10, 2020, 3:04 PM
    Hi, is openId connect will support moodle app?
1 2 3 4
Please login to post comments