Search This Blog

Thursday, October 5, 2017

SQL to list Users logged to Lync and their device

Select (cast (RE.ClientApp as varchar (100))) as ClientVersion,R.UserAtHost as UserName,HRD.LastNewRegisterTime as LastRegisterTime, EP.ExpiresAt
        FROM rtcdyn.dbo.RegistrarEndpoint RE
       Inner Join rtc.dbo.Resource R on R.ResourceId = RE.OwnerId
       Inner Join rtcdyn.dbo.Endpoint EP on EP.EndpointId = RE.EndpointId
       INNER JOIN rtcdyn.dbo.HomedResourceDynamic HRD on HRD.OwnerId = R.ResourceId
        Order By UserName ,ClientVersion

No comments: