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

Redirect Exception with MFA Enabled / MS OAuth 2 / Policy View

XMLWordPrintable

    • MySQL
    • MOODLE_405_STABLE, MOODLE_500_STABLE

      Hi Team,

      I have a Moodle 5.0 instance with MFA enabled and locally created logins. I have added an OAuth2 instance with Microsoft Entra ID (Azure AD), which works great. It authenticates and then goes to the User Profile screen (as there are some other mandatory fields they need to complete).

      However, a redirect exception error appears once they complete the fields and click Update Profile.


       
      The URL it is trying to redirect to is 
      https://<<domain>>/admin/tool/policy/view.php?versionid=2&returnurl=https%3A%2F%2F<<domain>>%2Fadmin%2Ftool%2Fpolicy%2Findex.php

      As the logon session also appears to be active, the user cannot escape from this point. Even editing the URL and returning to the root URL, it tries to redirect to the above link and errors with the message "Unsupported redirect detected, script execution terminated".

      Another user reported the same redirection issue with the MFA plugin for version 4.5.2 here:[ https://moodle.org/mod/forum/discuss.php?d=466885|https://moodle.org/mod/forum/discuss.php?d=466885]

      Disabling MFA seems to be the only workaround, which is not feasible.

      Appreciate the investigation and fix at your earliest.

      Cheers,
      Ray.

        1. image-2025-05-01-23-50-39-143.png
          17 kB
          UncleRaymondo
        2. image-2025-05-02-00-02-35-497.png
          30 kB
          UncleRaymondo
        3. image-2025-05-13-15-03-22-922.png
          17 kB
          UncleRaymondo
        4. image-2025-05-13-15-11-54-940.png
          21 kB
          UncleRaymondo
        5. image-2025-05-13-15-32-29-471.png
          4 kB
          UncleRaymondo
        6. image-2025-05-13-15-37-08-251.png
          13 kB
          UncleRaymondo

            Unassigned Unassigned
            uncleraymondo UncleRaymondo
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 7 minutes
                7m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.