Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Bitbucket Server attempts to add AD user to group twice

We are using Windows AD with Bitbucket server and saw a set of errors caused when a new user was added to AD.

Bitbucket is attempting to add the new user to a group (based on the AD group), but for some reason the user already exists in that group but with a different id (primary key).  The attempt to insert fails as a result of violating the unique constraints.

Here is the SQL statement that fails (names have been changed):

insert into
cwd_membership (parent_id,
parent_ name,
Values (295004,
'2021-07-28 13:17:41.355-04',

A record for this user already exists in the table, with the same information, but with a different id (primary key).
The existing record has an id of 1572868, while the record being inserted has an id of 1572876.

I'm not sure where (or how) Bitbucket is determining the id to use for inserting into the table.

Can anyone explain why Bitbucket is trying to add this user to the group TWICE?

Should I update the existing record to match the new id Bitbucket is trying to use?

0 answers

Suggest an answer

Log in or Sign up to
This widget could not be displayed.
Community showcase
Published in Marketplace Apps & Integrations

🚀 Weekly Atlassian News Roundup by Jexo & Adaptavist | 27th September 2021

Happy Monday community! This week Monday coffee with Jexo welcomed a special guest - @Jari Worsley from Adaptavist to present you the latest news from the Atlassian ecosystem. Thank you fo...

56 views 0 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you