web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

View who exported data from Dynamics

(0) ShareShare
ReportReport
Posted on by

Hi, 

We have a number of users access to Export to Excel from Dynamics and I would like to see who, when and what exported from Dynamics, but I can't seem to see that in the Audit Logs. Any suggestions how to monitor that?

Thanks

I have the same question (0)
  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    This information is not logged anywhere so in order to accomplish your goal you have 2 ways out:

    1. Develop a plugin that will handle RetrieveMultiple message, check parent context message and if it was called from "Export" message - log that event somewhere (for example to custom entity).

    2. Override standard Export button to store that information somewhere and call the standard export function.

  • Verified answer
    meelamri Profile Picture
    13,218 User Group Leader on at

    Hi,

    Please check my sample code. It refers to Andrew's first idea.

    using Microsoft.Xrm.Sdk;
    using System;
    
    
    namespace MEA.Plugins
    {
        public class PreOperationExportToExcel : IPlugin
        {
            public void Execute(IServiceProvider serviceProvider)
            {
                IPluginExecutionContext context = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext));
                ITracingService tracingService = (ITracingService)serviceProvider.GetService(typeof(ITracingService));
                IOrganizationServiceFactory factory = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory));
                IOrganizationService service = factory.CreateOrganizationService(context.UserId);
                var parentContext = context.ParentContext;
               
                if (parentContext != null && (parentContext.MessageName == "ExportToExcel" || parentContext.MessageName == "ExportDynamicToExcel"))
                {
                    Entity user = service.Retrieve("systemuser", context.UserId, new Microsoft.Xrm.Sdk.Query.ColumnSet("firstname", "lastname"));
                    String userName = user.GetAttributeValue("firstname")   " "   user.GetAttributeValue("lastname");
                    OrganizationRequest actionRequest = new OrganizationRequest("mea_ActionSendEmailOnExportToExcel");
                    actionRequest["UserName"] = userName;
                    actionRequest["Entity"] = context.PrimaryEntityName;
                    OrganizationResponse response = service.Execute(actionRequest);
                }
                
    
            }
        }
    }

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.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
11manish Profile Picture

11manish 174

#2
ManoVerse Profile Picture

ManoVerse 54 Super User 2026 Season 1

#3
Niki Patel Profile Picture

Niki Patel 42

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans