Skip to content

User Account Matching and Completion Authentication #2875

Description

@angusdenton

Hi All
We are trying to move over to OIDC authentication for all our users. Currently we are using LDAP.
Also we are an OpenLMS client so I cannot run SQL on the Moodle database that updates or creates records.
We are NOT trying to Sync data between Entra and Moodle, we are simply associating Moodle user accounts with Entra AD accounts where the Moodle username matches the username part of the AD UPN value and flipping the Auth Method to OIDC.

Moodle User asmith

matches

UPN asmith@sc.school.edu.au

Automatic matching is successful however a handful refuse to 'Complete'
Some of these accounts 'come good' 12 hours later, some never complete.

So what actually is completion ?
I had assumed that is the first login. Sometimes the matched users get an error if they attempt login that the Moodle account cannot be found, and we don't auto provision, that would create duplicate accounts.

From Lai Wei (@weilai-irl) post 2493
Regarding the status of the user on the "Manage User Connections" page:

  • "Connected." will show if the auth_oidc_token table has a record for the Moodle user with the userid field matching the ID of the Moodle account. A record is created in the table when a user that's connected has logged in to Moodle.
  • "Matched with existing user. Awaiting completion." will show if a record in the auth_oidc_token is not found for the Moodle account, but a record is found in the local_o365_connections table is found with the muserid column matching the Moodle user ID. This is when a manual connection is created.
  • "Synced from Azure AD. Awaiting initial login." will show if both above conditions are not met, but a record is found in the local_o365_objects table with type field set to user and moodleid field set to the Moodle user ID. This is when a user connection record is created automatically, e.g. from user sync, but the user hasn't logged in yet.

I can see the accounts in the corresponding Db tables (Can do a Db SELECT ONLY) as described in the "Matched..." status above.
Just cannot get em over the line to connceted.
An explanation and some help would be greatly appreciated.

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions