Could LDAP user use REST2?

When I call REST2 api with LDAP user acc using Basic Auth, it returns {“message”:“Unauthorized”}.
I also checked in rt db. The user exists in db. And I try called the same api with non LDAP user, it works.
How do you think why I can’t use LDAP user for REST2?