I want to ask a Question, how to list by MS SQL, or to the Excel User Information List? With all fields of hiden List User Information List.
I menaged to list User Login, Name and Surname, and email, by this MS SQL Query:
Declare @UserInfoID UniqueIdentifier
Declare @SiteID UniqueIdentifier
Declare @url nvarchar (100)
set @url = ''
Select @SiteID=w.SiteId, @UserInfoID=s.UserInfoListId
from WSS_Content.dbo.AllWebs W (nolock) join WSS_Content.dbo.AllSites S (nolock)
on s.Id = w.siteid
where w.fullurl = @url
select ui.tp_id, ui.tp_login as UserLogin, ui.tp_title as UserName, ui.tp_email, UI.tp_Deleted, UI.tp_isactive, UI.tp_domaingroup, ui.tp_token, ui.tp_externaltoken, aud.*
from WSS_Content.dbo.AllUserData AUD (nolock)
join WSS_Content.dbo.userinfo (nolock) UI
on AUD.tp_id = UI.tp_id and ui.tp_SiteID = aud.tp_SiteId
where AUD.tp_ListId = @UserInfoID and tp_IsActive=1 -- UI.TP_Login Like '%ADAccount%'
order by ui.tp_id
But How list much more fields ?