Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-65945

Azure AD Sign On (OAuth 2) doesn't always work



    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.6.4
    • Fix Version/s: None
    • Component/s: Authentication, Usability
    • Labels:
    • Affected Branches:



      We use Microsoft Azure AD sign on for our Moodle Cloud site (version 3.6.4). 

      However, for many of our users (including me and I have site administrator permissions), it often does not work.

      Occasionally it will work for me, but I often get a message that says "Your session has most likely timed out. Please log in again." When I click on Continue it takes me back to the log in page, and then the cycle repeats over and over again. Occasionally I can see the left hand menu as well as the error and then I can enter the Moodle site through the menu, but not always. It's often this cycle: Click on the Azure AD sign on, select my account, get error, click continue, repeat.

      When I click on "More information about this error" it takes me to this site: https://docs.moodle.org/36/en/error/moodle/invalidsesskey. Should we be checking out these options or is this likely a different kind of issue?

      One more thing I've noticed is that for some people, the authentication method shows as "OAuth2" in their profile. However, we always select "Manual accounts" when we create users, so I'm unsure how some say "OAuth2" or if that is in any way connected to the issue we are having.

      Thank you and please let me know if you require any further information.


        1. b2c_1.png
          103 kB
          Steve Massicotte
        2. b2c_2.png
          108 kB
          Steve Massicotte
        3. b2c_3.png
          117 kB
          Steve Massicotte
        4. b2c_4.png
          145 kB
          Steve Massicotte
        5. b2c_5.png
          79 kB
          Steve Massicotte
        6. Moodle Error.JPG
          30 kB
        7. OAuth 2 services settings.JPG
          17 kB



            • Votes:
              0 Vote for this issue
              4 Start watching this issue


              • Created: