by XDK
20. December 2013 06:42
Following is the sample query to get the user details associated with the team projects
SELECT TOP (10) PERCENT
login.display_name AS user_name,
proj.scope_name AS project,
login_grp.display_name AS user_group
FROM dbo.tbl_security_membership_cache AS membership INNER JOIN
dbo.tbl_security_identity_cache AS login ON membership.member_id = login.tf_id INNER JOIN
dbo.tbl_security_projects AS proj INNER JOIN
dbo.tbl_security_domain AS domain INNER JOIN
dbo.tbl_security_domain_groups AS grp ON domain.domain_number = grp.domain_number
ON proj.domain_number = domain.domain_number
ON membership.container_id = grp.group_id INNER JOIN
dbo.tbl_security_identity_cache AS login_grp ON grp.group_id = login_grp.tf_id
ORDER BY user_name, project