I having issues with my webhooks in Jenkins returning 500 errors stating "No such user". If I am logged into Jenkins and try and run them from my browser they work appropriately.
I have tried passing both the username and password as well as the api user id and api token in the url as below but received the same issue/error.
curl -X POST http://JENKINS_URL/job/JOBNAME/build --user APIUSERID:APITOKEN -data token=AUTHENTICATIONTOKEN
The one thing about the current jenkins setup that may make this weird is that the users are setup with the domain prefixed like domain\user which makes the API USER ID look like domain_user. This is like this because we have users logging in across different domains.
Let me know if I can provide any more information to solve the error "No such user". Jenkins Version 1.609.3
Below are a few lines from the corresponding error in jenkins.log
Sep 18, 2016 1:48:59 PM jenkins.security.BasicHeaderApiTokenAuthenticator authenticate
WARNING: API token matched for user DOMAIN\USER but the impersonation failed
hudson.plugins.active_directory.MultiCauseUserNotFoundException: No such user: DOMAIN_USER
Cause #1: org.acegisecurity.userdetails.UsernameNotFoundException: Authentication was successful but cannot locate the user information for DOMAIN_USER
Thanks,
Chris.