LMS User ID#

According to OEP-32, The LMS_USER_ID is now the standard for uniquely identifying users within an Open edX system. The credentials service has a column on the CORE_USER table (called LMS_USER_ID). This column will automatically populate in the following contexts for new users:

  1. If a user is awarded a credential by the LMS, when credentials is notified, a user in the CORE_USER table is created. The LMS_USER_ID will now also be populated.

  2. If a user logs into the system, and navigates to their record page, if a user does not already exist for them in the credentials service, one will be created and the LMS_USER_ID will be populated.

  3. If the system is configured to use the event bus to consume (course) CERTIFICATE_CREATED events, and if the user doesn’t exist in Credentials yet, a user in the CORE_USER table is created. The LMS_USER_ID will be populated.

Backpopulating Pre-existing users#

Although new users interacting with the system will automatically have this column populated, users who already exist in the system will not.

For those users, a management command exists to backpopulate the data. This management command utilizes endpoints in the LMS to retrieve and sync missing ids for learners in Credentials.