2 Responses to “Users in SharePoint Groups Using SQL”

  1. oKuxy Says:

    valium online pharmacy where can i buy valium online yahoo answers – buy valium uk cheap

  2. luis fernando rodrigues dos santos Says:

    You need to add site id in the join:

    SELECT DISTINCT u.tp_Login, g.Title AS GroupTitle, w.FullUrl, w.SiteId, w.Id, w.Title, g.Description
    FROM [WSS_Content_lider].[dbo].Groups g INNER JOIN
    [WSS_Content_lider].[dbo].Webs w ON g.SiteId = w.SiteId
    INNER JOIN [WSS_Content_lider].[dbo].GroupMembership gm ON gm.GroupId = g.ID
    INNER JOIN [WSS_Content_lider].[dbo].UserInfo u ON u.tp_ID = gm.MemberId and u.tp_SiteID = w.SiteId

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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

%d bloggers like this: