OAuth 2: Can Moodle sync with updated data in service provider?

OAuth 2: Can Moodle sync with updated data in service provider?

by Oliver Smitkowski -
Number of replies: 2

Hi all,

we've set up a Moodle site using Keycloak as an OAuth 2 service provider. Users have been imported into Keycloak, and account creation in Moodle is activated (authpreventaccountcreation: off).

During account creation, Moodle uses the "firstname", "lastname", and "email" fields provided by Keycloak to create the new account. However, when a user later edits their details in Keycloak, this is never reflected in Moodle. If I change my first name to "Joe" in Keycloak, it's still "Oliver" in Moodle.

We'd like Moodle to sync profile data with Keycloak at least on every login. Is there a way to achieve this or do we have to activate authpreventaccountcreation for updated Keycloak profile data to be displayed in Moodle?

Thank you
Oliver

Average of ratings: -
In reply to Oliver Smitkowski

Re: OAuth 2: Can Moodle sync with updated data in service provider?

by Oliver Smitkowski -
It seems what I want is not possible with onboard resources in Moodle. I've opened another thread hoping to learn about alternative approaches.
In reply to Oliver Smitkowski

Re: OAuth 2: Can Moodle sync with updated data in service provider?

by Oliver Smitkowski -
I've since learned syncing profile data between Moodle and OAuth 2 providers should work just fine since a fix for Moodle 3.7. In our case, we had to change a setting in Keycloak to make it work.