We are in the progress of doing a user access audit. We found the XRM toolbox User Audit Viewer plugin to not meet our needs. We have over 650 users and just needed to know who had logged in within the last month or so.
I ended up writing the following FetchXML and running it in the FetchXML Tester in XRM Toolbox.
Due to the volume of data we have (with 650+ users and the multiple login activities which occur each day) we could only run it for just over a month without it timing out.
Hope this helps.
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true" aggregate="true" no-lock="false" >
<entity name="audit" >
<attribute name="createdon" alias="lastlogon" aggregate="max" />
<attribute name="action" groupby="true" alias="actionid" />
<attribute name="userid" groupby="true" alias="name" />
<filter type="and" >
<condition attribute="action" operator="eq" value="64" />
<condition attribute="createdon" operator="on-or-after" value="2019-09-01" />
</filter>
<link-entity name="systemuser" from="systemuserid" to="objectid" link-type="outer" alias="SystemUser" >
<attribute name="fullname" groupby="true" alias="fullname" />
<attribute name="isdisabled" groupby="true" alias="isdisable" />
<filter type="and" >
<condition attribute="isdisabled" operator="eq" value="0" />
</filter>
</link-entity>
</entity>
</fetch>
------------------------------
Sharon Fish
Beyond Bank Australia
Adelaide
------------------------------
Original Message:
Sent: Oct 04, 2019 11:06 AM
From: Chris Harrington
Subject: Export login history for all active users
Have you looked at PowerGeoLog from PowerObjects?
https://www.powerobjects.com/powerpacks/powergeolog/
Full Disclosure: I work for PowerObjects, but I'm not in sales. :-)
While its normal function is to alert you if someone tries to login from an unknown location, the basic part is that it tracks the users logins. I've implemented it for a similar request to track who was logging in. We then did a rollup on the related user record to show how many logins they had, which allowed the administrator to see who was NOT logging in (rollup field = 0) so they could disable and re-use the license.
Good luck!
------------------------------
Chris Harrington
Solutions Architect
PowerObjects, an HCL Company
Original Message:
Sent: Oct 01, 2019 02:52 PM
From: Anthony Parks
Subject: Export login history for all active users
Hello,
The Dynamics 365 team here is trying to find a way to export the login history for all active users in the production environment YTD without the need for programming. If anyone knows of a solution, feedback is appreciated.
------------------------------
Anthony Parks
Dynamics 365 System Administrator
Comfort Systems USA
Indianapolis IN
------------------------------