Authentication using office365/Azure

Hi there,
Is it possible to use Microsoft Office 365/Azure for authentication, is there any modules available to do this?


1 Like

There is an LDAP auth app: GitHub - saurabh6790/frappe_ldap

Thanks for that, i have installed it and when i went to install the it in my site I get the following error:

Traceback (innermost last):
File “/home/erpnext/frappe-bench/apps/frappe/frappe/”, line 67, in application
response = frappe.handler.handle()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/”, line 77, in handle
File “/home/erpnext/frappe-bench/apps/frappe/frappe/”, line 94, in execute_cmd
ret =, **frappe.form_dict)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/”, line 781, in call
return fn(*args, **newargs)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/desk/page/applications/”, line 64, in install_app
File “/home/erpnext/frappe-bench/apps/frappe/frappe/”, line 122, in install_app
sync_for(name, force=True, sync_everything=True, verbose=verbose)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/”, line 43, in sync_for
import_file_by_path(doc_path, force=force)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/modules/”, line 54, in import_file_by_path
import_doc(doc, force=force, data_import=data_import, pre_process=pre_process)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/modules/”, line 122, in import_doc
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/”, line 210, in insert
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/”, line 607, in run_post_save_methods
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/”, line 551, in run_method
return Document.hook(fn)(self, *args, **kwargs)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/”, line 706, in composer
return composed(self, method, *args, **kwargs)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/”, line 689, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/”, line 545, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/core/doctype/doctype/”, line 123, in on_update
File “/home/erpnext/frappe-bench/apps/frappe/frappe/core/doctype/doctype/”, line 132, in run_module_method
module = load_doctype_module(, self.module)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/modules/”, line 64, in load_doctype_module
doctype_python_modules[key] = frappe.get_module(get_module_name(doctype, module, prefix))
File “/home/erpnext/frappe-bench/apps/frappe/frappe/”, line 583, in get_module
return importlib.import_module(modulename)
File “/usr/lib/python2.7/importlib/”, line 37, in import_module
File “/home/erpnext/frappe-bench/apps/frappe_ldap/frappe_ldap/ldap/doctype/ldap_settings/”, line 7, in
import ldap
ImportError: No module named ldap

Any ideas?

@rmehta, btw, the login button on that app has ‘via’ written as ‘vai’

Its a community app (so far) but if @saurabh6790 can fix it, we can add it to standard apps.


If you have already pulled app, then run ./env/bin/pip install python_ldap from frappe-bench

Hi folks,
i have the LDAP addon installed and looks like it is works, so big thank you guys :smile:
Does anyone know the office365\azure AD LDAP settings, i have googled but cant find anything that stands out. it would be so cool if we could get this working as I have moodle authenticating with office365 from one of the plugins available.


PS…it would be so great if someone could develop an addon for erpnext that integrates with office356 sharepoint for document storage, calendars and the authentication.

Sponsor it!


What would the price be to sponsor it?

Best regards,

That is something we also want to sponsor @rmehta

Just in case other are looking for an update on this…

Check these out: #4519 and #4496