SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have in my WebApplication several communities and some members (employees) that joined the community throughout the Webpart "Join Community". I wonder how to get all the communities (just the Title) in which an employee is joined using Object Server Model or other method.

Thank you very much

share|improve this question

I found the solution!

I implemented this query that can be used from a Stored procedure in a custom database. This SQL query solved my problem but must be reviewed when a new hotfix be released (The DB Model could change)

SELECT AllWebs.Title, docs.listid, AllWebs.SiteId, 
FROM AllUserData AS UserData 
        ON (UserData.[int1]=t2.[tp_ID]) AND 
            (UserData.[tp_RowOrdinal] = 0) AND 
            (t2.[tp_RowOrdinal] = 0) AND 
            ( (t2.tp_Level = 1) ) AND 
            (t2.[tp_IsCurrentVersion] = CONVERT(bit,1) ) AND 
            (t2.[tp_CalculatedVersion] = 0 ) AND 
            (t2.[tp_DeleteTransactionId] = 0x ) AND 
            (UserData.[tp_IsCurrentVersion] = CONVERT(bit,1) ) AND 
            (UserData.[tp_CalculatedVersion] = 0 ) AND 
            (UserData.[tp_DeleteTransactionId] = 0x ) 
    inner join Docs on UserData.tp_SiteId = Docs.siteId
    inner join AllSites on UserData.tp_SiteId = AllSites.Id
    inner join AllWebs on AllSites.Id = AllWebs.SiteId
WHERE (UserData.tp_Level = 1) AND 
    (UserData.tp_RowOrdinal=0) AND ((UserData.[int2] = 1)) and
    t2.[nvarchar4] = '' and 
    Docs.LeafName = 'MembersAllItems.aspx' and 
    AllSites.deleted = 0
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.