How to revoke APIToken after a user left Bee Bot July 13, 2022 11:39 Updated The content of this article has moved to the new documentation site. Related articles How to (re)generate my Jenkins user token How to remove all legacy API tokens in Operations Center Environment Too many open files How to select the correct agent to build my job? Comments 1 comment Sort by Date Votes Yaroslava Romanets February 26, 2020 11:41 One can also do something similar to https://support.cloudbees.com/hc/en-us/articles/115003090592-How-to-re-generate-my-Jenkins-user-token#usingtherestapi So, execute the same action using REST API rather than programmatic access. curl '<jenkinsURL>/me/descriptorByName/jenkins.security.ApiTokenProperty/revoke' \ --data "tokenUuid=token-uuid" \ --user '<username>:<password>' For code details see https://github.com/jenkinsci/jenkins/blob/e19f9128301307a88d849a0393238ee2c9e4b3be/core/src/main/resources/jenkins/security/ApiTokenProperty/config.jelly#L121 and https://github.com/jenkinsci/jenkins/blob/e19f9128301307a88d849a0393238ee2c9e4b3be/core/src/main/resources/jenkins/security/ApiTokenProperty/resources.js#L36 0 Please sign in to leave a comment.
Comments
1 comment
One can also do something similar to https://support.cloudbees.com/hc/en-us/articles/115003090592-How-to-re-generate-my-Jenkins-user-token#usingtherestapi
So, execute the same action using REST API rather than programmatic access.
For code details see https://github.com/jenkinsci/jenkins/blob/e19f9128301307a88d849a0393238ee2c9e4b3be/core/src/main/resources/jenkins/security/ApiTokenProperty/config.jelly#L121 and https://github.com/jenkinsci/jenkins/blob/e19f9128301307a88d849a0393238ee2c9e4b3be/core/src/main/resources/jenkins/security/ApiTokenProperty/resources.js#L36
Please sign in to leave a comment.