REST Api - Simple Authentication With Ldap User

curl -X POST https://{your frappe instance}/api/method/login
-H ‘Content-Type: application/json’
-H ‘Accept: application/json’
-d ‘{“usr”:“Administrator”,“pwd”:“admin”}’

When I use this method with erpnext user, authentacation is success.

    "message": "Logged In",
    "home_page": "/app",
    "full_name": "Administrator"

But When I use login with ldap user, return this;

    "message": "Invalid login credentials",
    "exception": "frappe.exceptions.AuthenticationError",
    "exc": "[\"Traceback (most recent call last):\\n  File \\\"apps/frappe/frappe/\\\", line 56, in application\\n    init_request(request)\\n  File \\\"apps/frappe/frappe/\\\", line 131, in init_request\\n    frappe.local.http_request = frappe.auth.HTTPRequest()\\n  File \\\"apps/frappe/frappe/\\\", line 37, in __init__\\n    self.set_session()\\n  File \\\"apps/frappe/frappe/\\\", line 74, in set_session\\n    frappe.local.login_manager = LoginManager()\\n  File \\\"apps/frappe/frappe/\\\", line 121, in __init__\\n    if self.login() == False:\\n  File \\\"apps/frappe/frappe/\\\", line 144, in login\\n    self.authenticate(user=user, pwd=pwd)\\n  File \\\"apps/frappe/frappe/\\\", line 246, in authenticate\\n\\\"Invalid login credentials\\\")\\n  File \\\"apps/frappe/frappe/\\\", line 301, in fail\\n    raise frappe.AuthenticationError\\nfrappe.exceptions.AuthenticationError\\n\"]"

Hii @gelveri

Please refer to:

Bro, my ldap integration is working. My users can log in. I have no problem here.

My problem is this;
My local users can log in with the post method using the rest api in the documentation. But only with this method my ldap users cannot log in.