Whose access token is this in GitLab?

Hi.
We have an expired token. Please tell me, is there any way to find out from which user this token is?
Thank.

Unfortunately I don’t know of any way. I once found a valid token and wanted to know which rights the user(s) of it gained. It wasn’t until I guessed which user had issued it that I got any further.

I found the solution:
gitlab-rails console
PersonalAccessToken.find_by_token(“owMyTokenHere”)

2 Likes

Great. I’ve never found any good documentation of what you can do in the rails console, so allow me to ask how you found that solution?

I used this documentation:
https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html