Share via


How to build a query that shows the email address of the last logged on user

Question

Thursday, August 13, 2015 8:27 AM

When querying System Resource, I can get the last logged on user. How can I show an additional column containing the email address of that user ?

Stephane

Stephane

All replies (4)

Thursday, August 13, 2015 9:08 AM ✅Answered

You mean the E-mail property, of the General tab, of the user in the Active Directory? If so, then you're looking for the Mail property of the user in ConfigMgr.

My Blog: http://www.petervanderwoude.nl/
Follow me on twitter: pvanderwoude


Thursday, August 13, 2015 12:05 PM ✅Answered | 1 vote

Here's a basic query to do this,

Select SYS.Name0,SYS.User_Name0, USR.Mail0 from V_R_System SYS
JOIN V_R_User USR ON SYS.User_Name0 = USR.User_Name0

Let me know if it fit your need.

Benoit Lecours | Blog: System Center Dudes


Thursday, August 13, 2015 10:39 AM

I created a simple query in SCCM Monitoring based on the System Resource. With it I can find for each client system the last logged on user, and I'd like to add a column with the email address of that user. I tried to create a join with the User Resource to fetch the user's email, but I can't figure out to do this basic thing in SCCM 2012 R2. I must be overlooking something really basic :(

Has anyone a pointer to a how-to ? 

Stephane

Stephane


Wednesday, November 1, 2017 5:00 PM

I know this is an old post, but just to say thanks for the non-facetious answer.

Looking through many more posts from others they could only skirt around what was actually required.