Hello,
Im an ADMIN in the bitbucket of our company, is there a way for me to reset the OTP of a user if the user is not receiving any OTP on his device
Hi @klim ,
It depends on whether you are on Bitbucket Cloud or Bitbucket Data Center, and on Cloud a Bitbucket workspace admin cannot reset it. Which one are you on?
Bitbucket Cloud
Login goes through the user's Atlassian account, so the reset is done there, not in Bitbucket.
If the user gets codes from an authenticator app and they are rejected, also check that the clock on the phone is correct.
Bitbucket Data Center (built-in two-step verification)
The second step is a code from an authenticator app, so nothing is sent to the device. The user can log in with the recovery key from setup. If that is lost too, a system admin can unenroll the user over REST:
DELETE <base-url>/rest/tsv/latest/totp/unenroll/user/{username} Body: { "totpCode": "<your own current TOTP code>" }
The system admin must have two-step verification set up themselves, and the call needs a valid admin session cookie. A 204 response means the user was unenrolled and can enroll again.
If your OTP comes from a third-party 2FA app instead, the reset is in that app's admin settings.
thank you @Christos Markoulatos -Relational- , i have already tried the first step that you have provided.. but it's weird that when the user tries to relogin again, even if i have transferred him to a policy where 2FA is disabled, will still ask for the same thing, also tried logging in to a different device but still the same result, it always ends up in the bitbucket 2FA notification screen, i also tried deleting the user and inviting him again to the organization, but still same effect.. we cant bypass the 2FA Bitbucket screen.
That points to the Bitbucket-side two-step verification, not the Atlassian account one. They are two separate things:
If the screen the user hits has the "Forgot code" button, this is the recovery route, and it can only be done by the user:
Two things to check: the emails go to the primary email of the Bitbucket account, so look in spam and junk folders too. And Atlassian states it cannot disable two-step verification on a Bitbucket user account, so there is no admin override; if the recovery email never arrives, the user should raise a support ticket with Atlassian.
If the user still has an SSH key registered on a machine, the Bitbucket docs also describe retrieving the recovery codes over SSH, which skips the 24 hour wait.
Sources:
It looks like you're new here. Sign in or register to get started.