Hi All, I am hoping someone can help me. My organization currently uses 'User Audit Viewer' in XRM Tool Box to find all users who haven't logged in for 3 months. However, this report doesn't show you users who have never logged in. Does anyone know of any FETCHXML that can help me achieve this? I've tried to build from the user entity and link to audit entity, but I've failed to generate what I need. Any help would be greatly appreciated.
Hi Daniel - thank you for taking out the time to help respond to my query.
What you have suggested is a great idea... it's actually a very simple idea and easily implementable when I think about it.
I'm going to give it a shot.
Hi Leco - thank you for responding to my query.
We are cloud based so it's a bummer I can't use that SQL query... however I've read the blog you linked and it's given me an idea on an approach I can attempt.
Appreciate you taking out the time to respond.
hey Nisar.
I'm not sure if its still valid, as Auditing was being moved out of DB into a separate container (Log capacity). But I can think of
a) querying using the User Audit Viewer to retrieve users that haven't logged on the last 3 months.
b) check for those that have logged in the last 3 months
c) get all users from the environment, and compare to the previous 2 lists. If the user is not on one of those two lists, probably it hasn't ever logged in.
Another possibility for you is to check ledgeviewpartners.com/.../. Basically, enable the auditing to go to compliance center. If the user has logged in the last 6 months (or 1 year) and then, users who haven't logged in that time.
Regards
Hi partner,
The 'User Audit Viewer' allows you to query each user's login history, as well as export a report to Excel for users who have not logged in for a certain period. The only thing not included in the report are users who have never logged in, so you must manually look at each user's login history to see if it's empty. I don't know if you are using the online or on-premises version? if you are using the on-premises version of Microsoft Dynamics 365, you can query the Audit.
SELECT su.fullname,
su.domainname,
su.userlicensetype,
su.accessmode
FROM systemuser AS su
WHERE su.systemuserid IN (SELECT systemuserid
FROM systemuser
EXCEPT
SELECT DISTINCT objectid
FROM audit
WHERE operation = 4);
Please refer to the link:
https://nishantrana.me/2020/05/22/get-users-last-logon-time-in-dynamics-365/
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
MVP-Daniyal Khaleel 76
Tom_Gioielli 28 Super User 2025 Season 2
Gerardo RenterÃa Ga... 17 Most Valuable Professional