0

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.

cdlaforc
  • 11
  • 1
  • 3
  • Are there any relevant messages in your logs? – user9517 Sep 18 '16 at 19:11
  • Please edit them into your question – user9517 Sep 18 '16 at 20:20
  • I found this issues on the Jenkins issue site that seems to be the same as what I am having. [link](https://issues.jenkins-ci.org/browse/JENKINS-24958) . I have however found a work around that seems acceptable which is not passing a username/password in the webhook, but giving the anonymous user overall read and job read permissions. – cdlaforc Sep 18 '16 at 23:34

0 Answers0