Tuesday, April 30, 2013

Get the last log-in DateTime of CRM user in MS CRM 2011



In Microsoft Dynamics CRM 2011 you can get the last log-in time of a CRM user by using the below query:

SELECT
SU.SystemUserId
,SU.DomainName
,SU.FullName
,SUO.LastAccessTime
FROM SystemUser SU
INNER JOIN [MSCRM_CONFIG].[dbo].[SystemUserOrganizations] SUO ON SUO.CrmUserId = SU.SystemUserId
INNER JOIN [MSCRM_CONFIG].[dbo].[SystemUserAuthentication] SUA ON SUA.UserId = SUO.UserId
ORDER BY SUO.LastAccessTime DESC,SU.DomainName

5 comments:

Unknown said...

Keep up the fantastic piece of work, I read few blog posts on this web site and I believe that your site is real interesting and has lots of great information. ERP Software in Mumbai || System Software || CRM Software in Mumbai || MLM Software

Unknown said...

I really appreciate spending some time to talk about that, I believe firmly regarding this and so really enjoy understanding more about this kind of subject.This is also a very good post which I really enjoyed reading. It is not everyday that I have the possibility to see something like this. CRM Software || MLM Software in Mumbai || ERP Software || System Software in Mumbai

Unknown said...

Let us dream of tomorrow where we can truly love from the soul, and know love as the ultimate truth at the heart of all creation. See the link below for more info.


#truly
www.ufgop.org

joy said...

Time is gold. We should treasure every second of it so that in time we would not regret anything because we only live ones.I have read your article and i was glad and inspired. Thanks for it, Cheers!
Visit my site if you have time, Enjoy.

n8fan.net

www.n8fan.net

Harj said...

Thanks for this - very helpful. I thought I'd have to write the SQL myself..!