Posted in Marketing Cloud, Salesforce

Extracting Audit Trail from Marketing Cloud

Downloading Audit Trail is not a direct or a single step process in Marketing Cloud. We need to utilize the Automation Studio to achieve this.

Setting up the Data Extract

  1. Navigate to Automation Studio > Activities tab.
  2. Create a new Activity by clicking the Create Activity button.
  3. In the pop-up window, select Data Extract and Next:

In case you don’t see this option, see if you have permissions. Still if it is not enabled in your edition, you can raise a support ticket to enable this feature.


  1. Fill out the Name and Description (optional)
  2. File Naming Pattern is important. Provide a readable format. In case you wish to automate this download, try including the wildcard specifiers:
Personalization StringWildcard Specifier

Followed by csv extension since the file will be downloaded as CSV.
Say, I automated to download audit trail every month so I have it like: %%Year%%- %%Month%% Audit Trail Activity Log.csv.

  1. In the Extract Type, you can select Audit Trail Access/Activity Log. To know the difference between two extract types, read here.
  2. Once filled, click Next.


  1. You can specify the range for the extract of the Audit Trail:
    1. Rolling Range: 1 – 90 days.
    2. Specific Range: Range between two dates.
  2. You can select the Timezone for the dates in the Audit.
  3. Optionally, you can choose if you need (to be included in the Audit)
    1. Time Zone
    2. Convert to ASCII
    3. Include Header
  4. Click Next


  1. Review the configurations and click Finish.

When the extract activity completes, it places the file in Safehouse file location (Marketing cloud’s secure, highly redundant, highly available central storage server for the files which can be accessed only by the authenticated users. Safehouse retains the files for 21 days before getting deleted). See more about the file locations available in the marketing cloud here.

In order to fetch the file from the Safehouse file location, we need to create an Enhanced FTP which are the standard import and export directories. You need File Transfer Activity to transfer. (Remember, you need to choose Move a File from Safehouse in the File Action) and provide the exact File Name that you created in the step 5.)

Creating Automation

We have created an activity. Now its our turn to setup when and how to run this activity. To do so, we need to create a new Automation.

  1. Navigate to Automation Studio > Overview.
  2. Create a new automation by clicking New Automation button.
  3. In the Starting Source add a Schedule source by dragging the Schedule to the “Start with a Starting Source” placeholder.
    1. Click the Configure Button.
    2. Provide the Starting Date and Time for the time zone of your choice.
    3. Choose the Repeat Frequency – Hourly/Daily/Monthly/Yearly. (I chose Monthly)
  4. Next, drop the “Data Extract” activity to the Canvas. It should be the Step 1 now.
  5. Click the Choose button.
    1. In the Pop-up window, select the Extract Activity that we created earlier.
    2. Press Done.
  6. Now the file is stored under the Safehouse File Location as mentioned earlier. We are to move it to Enhanced FTP location to Export the file.
  7. Now, Add the File Transfer Activity to the canvas as a next step.
  8. Click the Run Once button to run the Automation.
  9. Select the checkboxes in the Step 1 and Step 2 and hit Run.
  10. You can monitor the process in the Activity tab.

Downloading the File

Now the file is available in the Enhanced FTP File Location. You need an FTP Account to access the file. In case you haven’t created one,

  1. Navigate the Setup > Data Management > FTP Accounts.
  2. Click Add FTP User.
  3. Provide the Email Address, Secure Password and Click Next.
  4. Ignore the next step for SSH keys, just click Save.

You can use any of the FTP client like WinSCP or Online FTP Tools like net2ftp (use at your own risk) and enter the details of your FTP Accounts. Remember, though this is FTP, you use SFTP’s Port (22).

Upon successful login, you can find the file under Import directory. You can download the CSV file to get the Audit Log.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s