Disable "Use your Office 365 credentials to login to Moodle" connection option

Re: Disable "Use your Office 365 credentials to login to Moodle" connection option

by Jon Breitenbucher -
Number of replies: 6
Well, that option is already unchecked (never checked it because we don't want to switch their authentication). So, not sure how you are supposed to disable this option and keep it from displaying to users. It sure would be nice if you could and I believe you used to be able to as we did it on our Moodle instance last year with the previous O365 plugin. I am playing with this option on a test server and it is actually not matching and syncing the users. I had hoped to avoid the fallback of a giant Excel sheet.

My username in Moodle is jbreitenbucher and in the sync it looks like it is looking for jbreitenbucher@wooster.edu to match on in O365. If I just manually try to match to jbreitenbucher then it takes me to a personal O365 rather than giving me the option to pick personal or organizational.
In reply to Jon Breitenbucher

Re: Disable "Use your Office 365 credentials to login to Moodle" connection option

by Doug Stevens -

We're having the same issue, the trouble is that with the 365 plugin students are able to select this option and therefore disable their ldap login. Any help on how to disable this switch would be wonderful. I've tried hiding OpenID connect but the option still works. 

In reply to Doug Stevens

Re: Disable "Use your Office 365 credentials to login to Moodle" connection option

by Erwin der Kinderen -

I have added a redirect to the end of the ucp.php page in the local/office365 plugin folder. Not a beautiful solution but it works.

In reply to Erwin der Kinderen

Re: Disable "Use your Office 365 credentials to login to Moodle" connection option

by Susmitha Nori -
Can you please help by giving more details on this redirect solution. What needs to be changes in the php file so that I can get login page to login as Manual admin ?
Now I am unable to login to Moodle with Manual admin credentials and none of the user that I can login with Office 365 have access to Site Administration in Moodle. How can I change the login method so that I can login with Manual admin credentials ?
In reply to Susmitha Nori

Re: Disable "Use your Office 365 credentials to login to Moodle" connection option

by Abu Ali -
Hi dear;
have you find the solution of your problem? if then please share with us
In reply to Abu Ali

Re: Disable "Use your Office 365 credentials to login to Moodle" connection option

by Doug Stevens -

I actually just disabled the 365 login and have everyone signing in through google. The Microsoft OAUTH is now only used for the OneDrive repository and app quick links. 

Completely solved the issue. 

Average of ratings: Useful (1)
In reply to Susmitha Nori

Re: Disable "Use your Office 365 credentials to login to Moodle" connection option

by Erwin der Kinderen -
Sorry, somehow i missed followups to this topic. I have done it like this:

$page->run($action);
?>
<meta http-equiv="refresh" content="0; URL=/../../index.php">

in ucp.php (in italic my addition to the file