Oauth2 authentification - issue with Microsoft
Do you have "prevent account creation" set?
If so, you will only be able to login if there already exists an account that has the email address of the Microsoft account you're using to login.
Try changing your email address in your moodle profile to your college email address and give it another go.
Also, if you have restricted domains to a non-college account setting, that would also prevent you from logging in using your college account (unlikely).
Thanks Daymon and Adam.
- My moodlesite.ca has been upgraded to 3.3.2 and same problem.
- Adam: yes, "prevent account creation" is NOT activated, as I'd like new users to be able to create a new account when connecting with Oauth2 Microsoft.
- Adam: I use my college email address in my admin profile, still does not work.
- Adam: I'm not sure about the "restricted domains to a non-college account setting". Where can I find this information?
As suggested by Daymon, I've attached a couple of screen shots.
The URL in my moodlesite.ca when the error is displayed is:
The error shown on the Moodle page is:
A required parameter (id) was missing.
This error happens when a webpage expects a parameter to be passed from another page (by post or cookie), and it fails to do so.
This happens sometimes when user session times out, due to inactivity, or when an URL that needs that mandatory parameter is instead directly typed in URL bar or invoked from browser bookmarks, like the SCORM Player page not being launched from a link in the course page.
It seems there is something wrong with an id. Notice that it works when connecting to moodle.org with my COLLEGE microsoft account. Maybe my moodlesite.ca and moodle.org don't ask for the same id or fields? The problem could be in the user fields mapping?
Thanks for your help!
One possibility is that you may have logged in using one account, then tried to repeat the test with the same session key (sesskey) as the first attempt. That would probably confuse the system and throw a parameter error.
Perhaps try closing the browser between attempts (or clearing recent history including cookies).
Let me know if this works.
I did what you suggested (I purged and deleted cookies, passwords, history, etc.), still the same problem.
Same problem again - in college - with different computers and web browsers.
A couple of my colleagues tried to authentify (Oauth2) with their college Microsoft account, and they got exactly the same error.
Thanks for your help.
Thanks for posting the screenshots and urls - they helped me diagnose this problem.
By replacing the code parameter with "a" characters and testing different lengths I was able to determine there is a configuration problem in your Apache server that is preventing this from working. OAuth works by passing long unguessable tokens around, so it requires very long url parameters.
You can see the problem is reflected by different error message responses from these 2 urls:
I googled this problem for you and this is the most likely answer:
Thanks a lot Damyon, it works!