[Solved] API through curl and LDAP account


I wanted to use curl to request manageiq api, I used the following command:
curl https://mymanageiq.mydomain.com/api -k -u "username@mydomain.com:password"

It works well when I use the local admin account but failed with a user account which come from LDAP (using the same account on webUI works)
I tried to put username:password in url and tryed with a netrc.
As I have special characters in password and @ in username, I tried to encode all using HTML encoding but it failed too.

I always get a 401. In evm.log I have: Authentication failed for userid username@mydomain.com, unable to find user object in LDAP.

I tried with a simple python script to call the api with the same user and it works.

Do you know what I missed in my curl command?

I’m using euwe-2, I also found the same behavior on Cloudforms 4.2

Solved this after reconfiguring LDAP settings on my appliance.