Hi Community,
I have an admin rights to the bitbucket workspace and atlassian product but I don't find any way to retrieve the mfa status for all the bitbucket users. Also I don't see any such api available under the documentation.
It'll be helpful for me if someone provide me any bitbucket api to retrieve such user details ?
Thanks & Regards,
Jawad Abbasi
https://developer.atlassian.com/cloud/bitbucket/rest/api-group-workspaces/#api-workspaces-workspace-members-get can do that, however it will not include the mfa status by default. You need to request the additional fields.
e.g.:
`https://api.bitbucket.org/2.0/workspaces/{workspace}/members?fields=%2Bvalues.user.*%2C%2Bnext`
The response will have a field named `has_2fa_enabled`
@Saxea _Flowie_ Thank you so much. I got expected result by using the above api.
Command :
curl --request GET --user <username>:<app_pass> --url 'https://api.bitbucket.org/2.0/workspaces/terratrak/members?fields=%2Bvalues.user.display_name%2C%2Bvalues.user.has_2fa_enabled%2C%2Bnext' | jq '.values[] | {Name: .user.display_name, MFA_status: .user.has_2fa_enabled}'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.