SSO Integrations: No module named social.backends.azuread

I was trying to setup: SSO with azure AD following opnedx docs. After setting up this config, LMS is crashing with below exception. what is easiest way to patch this issue with tutor without rebuilding,


“THIRD_PARTY_AUTH_BACKENDS”: [“social.backends.azuread.AzureADOAuth2”],

Hi @venkat.330! I believe you forgot to post the exception you are facing.

I though that was the subject …

lms-worker_1        |   File "./", line 120, in <module>
lms-worker_1        |
lms-worker_1        |   File "/openedx/edx-platform/lms/", line 19, in run
lms-worker_1        |     django.setup()
lms-worker_1        |   File "/openedx/venv/local/lib/python2.7/site-packages/django/", line 27, in setup
lms-worker_1        |     apps.populate(settings.INSTALLED_APPS)
lms-worker_1        |   File "/openedx/venv/local/lib/python2.7/site-packages/django/apps/", line 108, in populate
lms-worker_1        |     app_config.import_models()
lms-worker_1        |   File "/openedx/venv/local/lib/python2.7/site-packages/django/apps/", line 202, in import_models
lms-worker_1        |     self.models_module = import_module(models_module_name)
lms-worker_1        |   File "/usr/lib/python2.7/importlib/", line 37, in import_module
lms-worker_1        |     __import__(name)
lms-worker_1        |   File "/openedx/edx-platform/common/djangoapps/third_party_auth/", line 51, in <module>
lms-worker_1        |     _PSA_BACKENDS = { backend_class for backend_class in _load_backend_classes()}
Stopping tutor_local_lms_1              ... done
lms-worker_1        |     _PSA_BACKENDS = { backend_class for backend_class in _load_backend_classes()}
lms-worker_1        |   File "/openedx/edx-platform/common/djangoapps/third_party_auth/", line 48, in _load_backend_classes
lms-worker_1        |     auth_class = module_member(class_path)
lms-worker_1        |   File "/openedx/venv/local/lib/python2.7/site-packages/social_core/", line 58, in module_member
lms-worker_1        |     module = import_module(mod)
lms-worker_1        |   File "/openedx/venv/local/lib/python2.7/site-packages/social_core/", line 52, in import_module
lms-worker_1        |     __import__(name)
lms-worker_1        | ImportError: No module named social.backends.azuread

I have never used the Azure identity provider, but I’m pretty sure there is a mistake in the official Open edX docs. Please try with “social_core” instead of “social”:

"THIRD_PARTY_AUTH_BACKENDS": ["social_core.backends.azuread.AzureADOAuth2"]

EDIT: I created a PR to fix the docs upstream


Thanks, it worked.:slight_smile:

How to configure the above Azure AD SSO in tutor?