Integrate Atlassian BitBucket with Active Directory

Posted: December 12, 2018 in Windows Server

In this example 2 AD groups will be used


  • BitBucket.Admin (System Admin,Admin,Project creator,Bitbucket user)
  • BitBucket.User (Project creator,Bitbucket user)

Configuring Active Directory integration:

User directory-add directory-Microsoft Active Directory

Server Settings

Name: Active Directory server

Directory Type: Microsoft Active Directory


Port: 389

Username: ldapuser for searching AD

LDAP Schema

BaseDN: DC=example,DC=com

LDAP Permissions:

Read only

Advanced settings

Check Enable nested groups (leave other settings)

User Schema Settings

Show only members of BitBucket.Admin/Bitbucket.User AD groups

UserObject class: user

UserObjectFilter:(&(objectCategory=Person)(sAMAccountName=*)(|(memberOf:1.2.840.113556.1.4.1941:=cn=BitBucket.Admin,OU=Groups,DC=example,DC=com (memberOf:1.2.840.113556.1.4.1941:=cn=BitBucket.User,OU=Groups,DC=example,DC=com)))

UserNameAtribute: sAMAccountName

UserName RDN Atribute: cn

User First Attribute Name: givenName

User Last Name attribute: sn

User Display Name Attribute: displayName

User Email Attribute: mail

User Password Attribute: unicodePwd

User Unique Attribute: objectGUID


Group Schema settings


Group Object Class: group

Group Obect Filter: (&(objectCategory=Group)(cn=BitBucket*))

Group Name attribute: cn

Group Description Attribute: description

Configuring group access and roles

In BitBucket go to Global permissions-add groups and assign roles

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s