Did you figure it out in the end cause I am facing the same issue right now :)
[email protected] schrieb am Donnerstag, 3. März 2022 um 21:31:25 UTC+7: > "Still trying to wade through the seemingly half outdated guides" > I'm referring to Azure guides not Web2Py. > > On Thursday, March 3, 2022 at 2:10:33 PM UTC+1 [email protected] wrote: > >> No it's not on-premise. They said so explicitly. Apologise for the low >> info questions. Still trying to wade through the seemingly half outdated >> guides. Finally got the Flask demo that MS provides to work so that I know >> the Azure side of things is working at least. Now have to figure out how to >> implement it in Web2Py. Is the ldap_auth method only for on premise AD? >> >> On Wednesday, March 2, 2022 at 7:24:58 PM UTC+1 [email protected] wrote: >> >>> Hi, >>> >>> do you really use Azure AD? Otherwise, for normal on-premise AD, see the >>> documentation on >>> http://web2py.com/books/default/chapter/29/09/access-control#LDAP and >>> https://github.com/web2py/web2py/blob/master/gluon/contrib/login_methods/ldap_auth.py >>> >>> Nico >>> >>> >>> Il giorno mer 2 mar 2022 alle ore 16:48 [email protected] < >>> [email protected]> ha scritto: >>> >>>> We're looking into adding AD authentication to our app. We have an >>>> active directory account and an app registered on it. >>>> >>>> In the documentation I found this example of enabling AD auth: >>>> >>>> from gluon.contrib.login_methods.ldap_auth import ldap_auth >>>> auth.settings.login_methods.append( >>>> ldap_auth( >>>> mode='ad', >>>> server='https://aad.portal.azure.com/', >>>> base_dn='ou=Users,dc=domain,dc=com' >>>> ) >>>> ) >>>> >>>> However I get this error when trying to login >>>> >>>> DEBUG:web2py.auth.ldap_auth:Traceback (most recent call last): >>>> File >>>> "C:\urban\web2py_latest\web2py\gluon\contrib\login_methods\ldap_auth.py", >>>> line 236, in ldap_auth_aux >>>> con = init_ldap() >>>> File >>>> "C:\urban\web2py_latest\web2py\gluon\contrib\login_methods\ldap_auth.py", >>>> line 630, in init_ldap >>>> "ldap://" + ldap_server + ":" + str(ldap_port)) >>>> File "C:\Python27\lib\site-packages\ldap\functions.py", line 92, in >>>> initialize >>>> uri, trace_level, trace_file, trace_stack_limit, bytes_mode, >>>> **kwargs) >>>> File "C:\Python27\lib\site-packages\ldap\ldapobject.py", line 106, in >>>> __init__ >>>> self._l = >>>> ldap.functions._ldap_function_call(ldap._ldap_module_lock,_ldap.initialize,uri) >>>> File "C:\Python27\lib\site-packages\ldap\functions.py", line 55, in >>>> _ldap_function_call >>>> result = func(*args,**kwargs) >>>> LDAPError: (0, 'Error') >>>> >>>> Am I doing anything wrong on the web2py side or is the issue in the AD >>>> configuration? >>>> >>>> -- >>>> Resources: >>>> - http://web2py.com >>>> - http://web2py.com/book (Documentation) >>>> - http://github.com/web2py/web2py (Source code) >>>> - https://code.google.com/p/web2py/issues/list (Report Issues) >>>> --- >>>> You received this message because you are subscribed to the Google >>>> Groups "web2py-users" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/web2py/7d013980-154b-4b94-9365-4a64f9e32423n%40googlegroups.com >>>> >>>> <https://groups.google.com/d/msgid/web2py/7d013980-154b-4b94-9365-4a64f9e32423n%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>> -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/a406d846-fdc8-4e71-aa0c-4efb8b4f1c5an%40googlegroups.com.

