Customer Engagement & Dynamics CRM Forum

Expand all | Collapse all

How to export data for multiple users with Xrm Toolbox "User Audit Viewer"?

Jump to Best Answer
  • 1.  How to export data for multiple users with Xrm Toolbox "User Audit Viewer"?

    Posted 15 days ago
    Hi there
    I'd like to export Login history and transactions for multiple users. It seems to me it is only possible to export data for 1 user at a time.
    Is there a way to export these data for multiple/all users at the same time?
    Maybe theres another tool or maybe one should use a query on SQL Server?

    Thanks in advance
    Heinz


  • 2.  RE: How to export data for multiple users with Xrm Toolbox "User Audit Viewer"?
    Best Answer

    TOP CONTRIBUTOR
    Posted 14 days ago
    @Heinz Arnold

    It's not possible using the User Audit View. However, you can achieve it by connecting your Dynamics 365/Power Apps to Power BI or Excel and accessing the audit table from there.

    There's a column in the audit table named Action where you need to filter on the value '64' which is User Access via Web.​

    If you don't have any experience connecting to data in D365 using Power BI or Excel, I think the easiest way getting started, is using the Power Query Builder in XrmToolBox. There's a guide here.

    ------------------------------
    BR,
    Niels
    ------------------------------



  • 3.  RE: How to export data for multiple users with Xrm Toolbox "User Audit Viewer"?

    Posted 14 days ago
    Edited by Heinz Arnold 13 days ago
    Hi Niels
    Thanks a lot. I connected via SQL Server Query, looks quite ok, joining tables AuditBase and SystemUserBase.
    SELECT top (100000)
    a.[CallingUserId]
          ,a.[UserId]
          ,a.[CreatedOn]
          ,a.[TransactionId]
          ,a.[ChangeData]
          ,a.[Action]
          ,a.[Operation]
          ,a.[ObjectId]
          ,a.[AuditId]
          ,a.[AttributeMask]
          ,a.[ObjectTypeCode]
          ,a.[ObjectIdName]
          ,a.[UserAdditionalInfo]
          ,a.[RegardingObjectId]
          ,a.[RegardingObjectIdName]	  
    	  ,u.FirstName
    	  ,u.LastName
      FROM [AuditBase] a INNER JOIN SystemUserBase u on a.ObjectId=u.SystemUserId
      WHERE a.Action=64​


    Thanks as lot.
    Heinz


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