Authentication: OpenID Connect

Maintained by 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.
2488 sites
53 fans
Current versions available: 11

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 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 Samuli Koskinen
    Tue, Jul 11, 2017, 9:06 PM
    Is there a way to get the 'email' attribute for the user, when using oidc to create a new account. This would be very crucial for me, since I got some automatic actions based on users email.
  • Picture of ajay kotnala
    Wed, Jul 26, 2017, 6:58 PM

    I am trying to consume this library with existing Identityserver 3 integration.
    I am using

    $plugin->version = 2016120501;
    $plugin->requires = 2016120500;
    $plugin->component = 'auth_oidc';
    $plugin->maturity = MATURITY_STABLE;
    $plugin->release = '';

    and I have one client in Identityserver 3 with
    redirect URI
    Flow is Authorization code
    Logout Uri and almost everything.
    I have already tried this client(idsrv3) with another application and it is working fine.

    In DashboardSite --> administration -->Plugins -->Authentication -->OpenID Connect

    i have configure
    Provider name = OpenID Connect
    ClientId = same as idsrv3
    Authorization endpoint=
    Token Endpoint=
    Redirect URI = https://localhost/moodle/auth/oidc/
    Authentication Method = Authorization Code Flow (recommended)

    but it is not showing any link or any changes on my login page.
    please suggest me if it works with identityserver3 or not.
    if yes then what is I am missing?

    ajay kotnala
  • Picture of Thomas College
    Wed, Aug 2, 2017, 9:57 PM
    We are currently using the OIDC plugin for Office 365 authentication. Would there be any benefit to moving from the OIDC plugin to the built in OAuth2 plugin available in Moodle 3.3 core? It seems to me that OIDC would be the better choice, but I was hoping to get input from those more knowledgeable than me.

  • 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

1 2 3 4
Please login to post comments