Auto editing user details by groups

Is it possible to auto-fill the details of users (Position, Department...) by their assigned groups? Or to set them automatically depending on their groups when they get created?

1 answer

It would be possible by querying the database directly. The user profile details are stored in the os_propertyentry table under entity_key columns:

confluence.user.profile.position
confluence.user.profile.phone
confluence.user.profile.department
confluence.user.profile.location

Each of those records will have a value for entity_id which relates to the content table contentid field:

content.contentid

You'll see this record is for a content.contenttype = userinfo type page.

Now the trick here is that the os_propertyentry records do not exist until you add those properties for a given user. So you would need to add that information for each user that is a member of a group.

Groups are stored in cwd_group, memberships are stored in cwd_membership, and users are in cwd_user. You'd need to join the sql statements for those tables to get appropriate memberships.

I believe the userinfo record in the content table is created when the user is created in the database. This would be on ldap sync or first login depending on the user directory type.

Hope this helps!

First of all thank you for answering,

unfortunately I didn t know that our accounts are linked form the active directory and editing these fields is disabled in confluence :/ . So the best (only?!) way for solving my problem is to maintenance the data in the AD. I have already herad there is an issue for sharing more information between AD and confluence but I could not find it. Is it already possible?

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 24, 2018 in Confluence

Atlassian Research opportunity with Confluence templates

Do you use templates with Confluence? Take part in a remote 1-hr workshop. You'll receive USD $100 for your time!   We're looking for people to participate in a   remote 1-hr workshop...

1,525 views 25 14
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you