Mitigating Issues with User Approval on the CircleCI Server
The server has a feature that requires the admin to approve users before they can use the CircleCI Server. However, there are instances where clicking the approve button does not function properly. This article aims to assist you in resolving this issue.
Prerequisites
The following require admin access and ability to access the cluster.
Steps to Mitigate Issues with User Approval on the CircleCI Server:
-
To access MongoDB, run the following command.
For Server versions using MongoDB 5.x and earlier (legacy
mongoshell):kubectl exec mongodb-0 -n <namespace> -it -- bash -c 'mongo --quiet mongodb://${MONGODB_USERNAME}:${MONGODB_ROOT_PASSWORD}@localhost/circle_ghe?authSource=${MONGODB_DATABASE}'For Server versions using MongoDB 6.x and later (
mongosh):kubectl exec mongodb-0 -n <namespace> -it -- bash -c 'mongosh --quiet mongodb://${MONGODB_USERNAME}:${MONGODB_ROOT_PASSWORD}@localhost/circle_ghe?authSource=${MONGODB_DATABASE}' -
After successfully connecting, run the following commands and look for the user that you were unable to approve:
db.identities.find({ "external-info.login": "username" }).pretty() db.users.find({ "login": "username" }) -
Search for the username and take note of the external-id of the user. You will find output similar to the following:
"external-id" : 10137, "external-info" : { "name" : "ACCOUNT NAME", "login" : "username", ... }, -
Run the following commands to delete the user:
db.users.deleteOne({ "login": "username" }) db.identities.deleteOne({ "external-id": 10137 }) // Replace the external-id with the value from the previous step. -
Finally, ask the user to sign up again, and you should be able to approve the user.
Comments
Article is closed for comments.