keycloak as ldap for Moodle

keycloak as ldap for Moodle

by Giovanni Visca -
Number of replies: 12

I'm trying to create a client on keycloak to use on moodle, I have made various tests without success. Can anyone make a suggestion? Thanks in advance

Average of ratings: -
In reply to Giovanni Visca

Re: keycloak as ldap for Moodle

by Matteo Scaramuccia -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Giovanni,
could you give us more details about your environment - at least, Moodle version - and the configurations you've tried in Moodle?

HTH,
Matteo

In reply to Matteo Scaramuccia

Ri: Re: keycloak as ldap for Moodle

by Giovanni Visca -
Hi Matteo,
I'm using the latest version of Moodle. I have always used Oauth2 with Google as Idp. It is my first time that I use Keyclock. I have problems in the Callback phase, after entering the user and password on the callback request to moodle I get an error that says to read the log. But I don't know where to look for this log.
I think I did all the correct steps, they are the same that Andreas wrote.
In reply to Giovanni Visca

Re: keycloak as ldap for Moodle

by Andreas Resch -
Hi Giovanni,

I accomplished it with the following steps

1. Under Site administration -> Server -> OAuth 2 services you push the button 'Create new custom service'
2. Create a new client in your keycloak and insert the id and the client secret in your new custom service, also the service base url of your keycloak is needed. Without it moodle can't get the correct configuration of your keycloak
3. Activate OAuth2 under Site administration -> Plugins
4. Done

The only problem I have is that all my (previously LDAP) users have to confirm their email on the first login. Does anybody have an idea how I could fix that?
In reply to Andreas Resch

Ri: Re: keycloak as ldap for Moodle

by Giovanni Visca -
Hi Andreas,

I have done the same things, I have a doubt how I should fill in these fields:
Valid Redirect URIs : https://xxxx/moodle/*
Base URL:
Thanks
In reply to Giovanni Visca

Re: Ri: Re: keycloak as ldap for Moodle

by Andreas Resch -
Where are those settings, I can't find them right now.
In reply to Andreas Resch

Ri: Re: keycloak as ldap for Moodle

by Giovanni Visca -
Hi Andreas,

I did exactly what you described. I get an error saying that the system is unable to recover username and email. Where can I check?
In reply to Andreas Resch

Re: keycloak as ldap for Moodle

by Philipp Markiewka -

I have the same Problem with the E-Mail confirmation. Did you find any solution yet?

In reply to Philipp Markiewka

Ri: Re: keycloak as ldap for Moodle

by Giovanni Visca -

Hi Philipp, 

I solved the problem. I managed to configure keyclack with the oAuth2 plug-in and also with the OpenID Connecet plug-in. 

If I can help you tell me.

In reply to Giovanni Visca

Re: Ri: Re: keycloak as ldap for Moodle

by Philipp Markiewka -
Hi Giovanni,

how did you manage to disable the E-Mail confirmation?
In reply to Philipp Markiewka

Ri: Re: Ri: Re: keycloak as ldap for Moodle

by Giovanni Visca -
Hi Philipp,

please explain better the issues because i didn't had this problem. When people receive the EMail confirmation, after login always?
In reply to Philipp Markiewka

Ri: Re: Ri: Re: keycloak as ldap for Moodle

by Giovanni Visca -
In reply to Giovanni Visca

Re: Ri: Re: Ri: Re: keycloak as ldap for Moodle

by Philipp Markiewka -

We want E-Mail confirmation in Keycloak, but not in moodle.

When we login to moodle with a verified Keycloak Account, we have to confirm the E-Mail a second time. We need to disable E-Mail confirmation in moodle only.

E-Mail confirmation