Customer Engagement & Dynamics CRM Forum

Expand all | Collapse all

Export login history for all active users

  • 1.  Export login history for all active users

    TOP CONTRIBUTOR
    Posted 15 days ago
    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
    ------------------------------
    Conference-CRMUG_200x200


  • 2.  RE: Export login history for all active users

    TOP CONTRIBUTOR
    Posted 14 days ago
    Hi @Anthony Parks, we use the User Audit Viewer​​ plugin in XRM ToolBox to monitor usage.  It allows you to query the login history for each user as well as export a report to Excel for users that haven't logged in within a certain period.  Only annoying thing about the reports are that they don't include users that have never logged in so you have to manually go through each users login history to see if it is blank.

    ------------------------------
    Mark Aston
    Engineer
    Ordnance Survey
    Southampton, UK
    ------------------------------

    Conference-CRMUG_200x200


  • 3.  RE: Export login history for all active users

    Posted 14 days ago
    @Mark Aston

    The XRM ToolBox plug-in can't be done in bulk, correct? Unless I am doing it wrong -- always possible -- you have to look at and export each user individually, correct?​

    ------------------------------
    Michael Rushton
    StoneMor Partners
    Trevose PA
    ------------------------------

    Conference-CRMUG_200x200


  • 4.  RE: Export login history for all active users

    TOP CONTRIBUTOR
    Posted 14 days ago
    Hi @Michael Rushton, you are correct, you can only query individual users as well as export that users' login history.


    ------------------------------
    Mark Aston
    Engineer
    Ordnance Survey
    Southampton, UK
    ------------------------------

    Conference-CRMUG_200x200


  • 5.  RE: Export login history for all active users

    TOP CONTRIBUTOR
    Posted 14 days ago
    Is there anything that can be used to export all enabled users login history for a specified period of time in bulk ?

    ------------------------------
    Anthony Parks
    Dynamics 365 System Administrator
    Comfort Systems USA
    Indianapolis IN
    ------------------------------

    Conference-CRMUG_200x200


  • 6.  RE: Export login history for all active users

    SILVER CONTRIBUTOR
    Posted 14 days ago
    We are very much needing this too.

    ------------------------------
    Kristina Bjerknes
    REDW
    ------------------------------

    Conference-CRMUG_200x200


  • 7.  RE: Export login history for all active users

    SILVER CONTRIBUTOR
    Posted 14 days ago
    The XrmToolbox has a tool that extracts the D365 Users with last log-in called User Audit Viewer.

    ------------------------------
    Hugh Konigsmark
    Global CRM/CPQ Director
    Bray International, Inc.
    Houston TX
    ------------------------------

    Conference-CRMUG_200x200


  • 8.  RE: Export login history for all active users

    GOLD CONTRIBUTOR
    Posted 13 days ago
    You also need to have enabled 'Audit User Access' in System Settings.
    In case this is disabled, no logs can be retrieved.

    ------------------------------
    Alexandros Miaris
    CRM Consultant
    Dixons Carphone
    Peristeri
    ------------------------------

    Conference-CRMUG_200x200


  • 9.  RE: Export login history for all active users

    Posted 13 days ago
    Edited by Jamie Parbery 13 days ago

    Just to add to this, at some point a while back, Read Auditing came out which started pushing stuff to the Security and Compliance Centre. One of the things it should be collecting is 'Signed in or Out'.

    https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/admin/enable-use-comprehensive-auditing ​

    I was testing this at the time and while I was able to export some stuff, a lot of the switches didnt really work and the export was a mess with a lot of the useful stuff unfilterable.
    I have no idea whether this has changed at all in the months since but its possibly worth looking at to see what can be done with it now.

    Jamie



    ------------------------------
    Jamie Parbery
    Kier Ltd
    ------------------------------

    Conference-CRMUG_200x200


  • 10.  RE: Export login history for all active users

    TOP CONTRIBUTOR
    Posted 13 days ago
    Hi @Jamie Parbery, I assume you are an Office 365 Global Admin to access the Security and Compliance Centre?  As a Dynamics System Admin I don't have permissions to access the Security and Compliance Centre.  One of our O365 Global Admins did show me what it looked like and as you say not all of it worked and the export was a mess.

    ------------------------------
    Mark Aston
    Engineer
    Ordnance Survey
    Southampton, UK
    ------------------------------

    Conference-CRMUG_200x200


  • 11.  RE: Export login history for all active users

    Posted 13 days ago

    ​It's hard to tell exactly what permissions got me into it as we're using a PIM thing and I have to request Global Admin to get into the O365 admin just for licensing stuff. I have little idea where the other O365 admin roles get you to be honest as we've not used them.

    Security and Compliance isn't our area either so I was surprised to be able to get into it without fighting the security guys for specific Privs.

    It feels like eventually all audits across power platfom stuff will end up in this area but the requirement for O365 admin rights outside of the D365 security roles brings its own confusion. This stuff is worth keeping an eye on the for improvements but we didn't find it to solve this requirement and ultimately resorted to XRMToolbox and/or giving up like everyone else.



    ------------------------------
    Jamie Parbery
    Kier Ltd
    ------------------------------

    Conference-CRMUG_200x200


  • 12.  RE: Export login history for all active users

    TOP CONTRIBUTOR
    Posted 13 days ago
    You can hit the audit logs with Power BI. I've seen it done. Unfortunately, our audit logs are too big and I've had trouble getting any reports built. It's worth a shot to see if you can get it to work. If you can hit them, I would think you can pull out the specific user access records.

    ------------------------------
    Julie Reynolds
    Enterprise Information Steward II
    Brotherhood Mutual Insurance
    Fort Wayne IN
    ------------------------------

    Conference-CRMUG_200x200


  • 13.  RE: Export login history for all active users

    TOP CONTRIBUTOR
    Posted 13 days ago
    As I was posting that, I realized that I can hit our test site which has all the logs except the current quarter deleted. It's amazing how fast it loaded as we only have 3 days of audit logs and I'm the only one who has done anything on that site! I'm actually excited that I can actually see something. Now to figure out how to be able to work with our production data.....

    ------------------------------
    Julie Reynolds
    Enterprise Information Steward II
    Brotherhood Mutual Insurance
    Fort Wayne IN
    ------------------------------

    Conference-CRMUG_200x200


  • 14.  RE: Export login history for all active users

    TOP CONTRIBUTOR
    Posted 12 days ago
    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
    ------------------------------

    Conference-CRMUG_200x200


  • 15.  RE: Export login history for all active users

    Posted 9 days ago
    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
    ------------------------------

    Conference-CRMUG_200x200


If you've found this thread useful, dive deeper into User Group community content by role