Export, configure, and view audit log records (2024)

  • Article

After you search the audit log and download the search results to a CSV file, the file contains a column named AuditData, which contains additional information about each event. The data in this column is formatted as a JSON object, which contains multiple properties that are configured as property:value pairs separated by commas. You can use the JSON transform feature in the Power Query Editor in Excel to split each property in the JSON object in the AuditData column into multiple columns so that each property has its own column. This lets you sort and filter on one or more of these properties, which can help you quickly locate the specific auditing data you're looking for.

Tip

If you're not an E5 customer, use the 90-day Microsoft Purview solutions trial to explore how additional Purview capabilities can help your organization manage data security and compliance needs. Start now at the Microsoft Purview compliance portal trials hub. Learn details about signing up and trial terms.

Step 1: Export audit log search results

The first step is to search the audit log and then export the results in a comma-separated value (CSV) file to your local computer.

  1. Run an audit log search and revise the search criteria if necessary until you have the desired results.

  2. On the search results page, select Export.

    Export, configure, and view audit log records (1)

    This option exports all the audit records from the audit log search you ran in step 1, and adds the raw data from the audit log to a CSV file. It takes a while to prepare the download file for a large search. Large files result when searching for all activities or using a wide date range.

  3. After the export process is complete, a message is displayed at the top of the window that prompts you to open the CSV file and save it to your local computer. You can also access the CSV file in the Downloads folder.

    Note

    You can download a maximum of 50,000 entries to a CSV file from a single audit log search. If 50,000 entries are downloaded to the CSV file, you can probably assume there are more than 50,000 events that met the search criteria. To export more than this limit, try using a narrower date range to reduce the number of audit log records. You might have to run multiple searches with smaller date ranges to export more than 50,000 entries.

Step 2: Format the exported audit log using the Power Query Editor

The next step is to use the JSON transform feature in the Power Query Editor in Excel to split each property in the JSON object in the AuditData column into its own column. Then you filter columns to view records based on the values of specific properties. This can help you quickly locate the specific auditing data you're looking for.

  1. Open a blank workbook in Excel for Office 365, Excel 2019, or Excel 2016.

  2. On the Data tab, in the Get & Transform Data ribbon group, select From Text/CSV.

    Export, configure, and view audit log records (2)

  3. Open the CSV file that you downloaded in Step 1.

  4. In the window that's displayed, select Transform Data.

    Export, configure, and view audit log records (3)

    The CSV file is opened in the Query Editor. There are four columns: CreationDate, UserIds, Operations, and AuditData. The AuditData column is a JSON object that contains multiple properties. The next step is to create a column for each property in the JSON object.

  5. Right-click the title in the AuditData column, select Transform, and then select JSON.

    Export, configure, and view audit log records (4)

  6. In the upper-right corner of the AuditData column, select the expand icon.

    Export, configure, and view audit log records (5)

    A partial list of the properties in the JSON objects in the AuditData column is displayed.

  7. Select Load more to display all properties in the JSON objects in the AuditData column.

    Export, configure, and view audit log records (6)

    You can unselect the checkbox next to any property that you don't want to include. Eliminating columns that aren't useful for your investigation is a good way to reduce the amount of data displayed in the audit log.

    Note

    The JSON properties displayed in the previous screenshot (after you click Load more) are based on the properties found in the AuditData column from the first 1,000 rows in the CSV file. If there are different JSON properties in records after the first 1,000 rows, these properties (and a corresponding column) won't be included when the AuditData column is split into multiple columns. To help prevent this, consider re-running the audit log search and narrow the search criteria so that fewer records are returned. Another workaround is to filter items in the Operations column to reduce the number of rows (before you perform step 5 above) before transforming the JSON object in the AuditData column.

    Tip

    To view an attribute within a list such as AuditData.AffectedItems, click the Expand icon in the upper right corner of the column you want to pull an attribute from, and then select Expand to New Row. From there it will be a record and you can click the Expand icon in the upper right corner of the column, view the attributes, and select the one you want to view or extract.

  8. Do one of the following things to format the title of the columns that are added for each JSON property that's selected.

    • Unselect the Use original column name as prefix checkbox to use the name of the JSON property as the column names; for example, RecordType or SourceFileName.
    • Leave the Use original column name as prefix checkbox selected to add the AuditData prefix to the column names; for example, AuditData.RecordType or AuditData.SourceFileName.
  9. Select OK.

    The AuditData column is split into multiple columns. Each new column corresponds to a property in the AuditData JSON object. Each row in the column contains the value for the property. If the property doesn't contain a value, the null value is displayed. In Excel, cells with null values are empty.

  10. On the Home tab, select Close & Load to close the Power Query Editor and open the transformed CSV file in an Excel workbook.

Use PowerShell to search and export audit log records

Instead of using the audit log search tool in the Microsoft Purview portal or the Microsoft Purview compliance portal, you can use the Search-UnifiedAuditLog cmdlet in Exchange Online PowerShell to export the results of an audit log search to a CSV file. Then you can follow the same procedure described in Step 2 to format the audit log using the Power Query editor. One advantage of using the PowerShell cmdlet is that you can search for events from a specific service by using the RecordType parameter. Here are few examples of using PowerShell to export audit records to a CSV file so you can use the Power Query editor to transform the JSON object in the AuditData column as described in Step 2.

In this example, run the following commands to return all records related to SharePoint sharing operations.

$auditlog = Search-UnifiedAuditLog -StartDate 06/01/2019 -EndDate 06/30/2019 -RecordType SharePointSharingOperation
$auditlog | Select-Object -Property CreationDate,UserIds,RecordType,AuditData | Export-Csv -Path c:\AuditLogs\PowerShellAuditlog.csv -NoTypeInformation

The search results are exported to a CSV file named PowerShellAuditlog that contains four columns: CreationDate, UserIds, RecordType, AuditData).

You can also use the name or enum value for the record type as the value for the RecordType parameter. For a list of record type names and their corresponding enum values, see the AuditLogRecordType table in Office 365 Management Activity API schema.

You can only include a single value for the RecordType parameter. To search for audit records for other record types, you have to run the two previous commands again to specify a different record type and append those results to the original CSV file. For example, you would run the following two commands to add SharePoint file activities from the same date range to the PowerShellAuditlog.csv file.

$auditlog = Search-UnifiedAuditLog -StartDate 06/01/2019 -EndDate 06/30/2019 -RecordType SharePointFileOperation
$auditlog | Select-Object -Property CreationDate,UserIds,RecordType,AuditData | Export-Csv -Append -Path c:\AuditLogs\PowerShellAuditlog.csv -NoTypeInformation

Tips for exporting and viewing the audit log

Here are some tips and examples of exporting and viewing the audit log before and after you use the JSON transform feature to split the AuditData column into multiple columns.

  • Filter the RecordType column to display only the records from a specific service or functional area. For example, to show events related to SharePoint sharing, you would select 14 (the enum value for records triggered by SharePoint sharing activities). For a list of the services that correspond to the enum values displayed in the RecordType column, see Detailed properties in the audit log.
  • Filter the Operations column to display the records for specific activities. For a list of most operations that correspond to a searchable activity in the audit log search tool in the Microsoft Purview portal or the compliance portal, see the "Audited activities" section in Search the audit log.
Export, configure, and view audit log records (2024)

FAQs

How do I export specific records from audit log search tool? ›

Run an audit log search in Microsoft Purview Audit and customize the search criteria if required until you get the desired results. Click the Export option in the search results page. This action exports all audit records retrieved from the audit log search you ran and adds this raw data to a CSV file.

How to export Dynamics 365 audit logs? ›

  1. Go to the Audit tab.
  2. Navigate to the Microsoft 365 service and the particular report you want.
  3. Once the report gets generated, click on the Export As option found in the top-right corner of the page. Note: You can export the report in CSV, PDF , HTML or XLSX formats.

How to configure audit log in SAP? ›

Procedure
  1. On the Database Overview page, with the Security and User Management or All view selected, navigate to the Auditing card.
  2. Enable auditing by choosing Turn On Auditing.
  3. Optional: Configure the required audit trail targets in the Auditing app. Note. ...
  4. Save your configuration.

How do I view audit logs in Dynamics 365? ›

Log in to Microsoft Dynamics CRM with a user with permission to manage auditing. Navigate to Settings > Auditing > Audit Summary View. Click Enable/Disable Filters to allow the ability to filter logs. Note: It is also possible to view audit logs from a record.

How do I export log Analytics query results? ›

On the Log Analytics workspace menu in the Azure portal, select Data Export under the Settings section. Select New export rule at the top of the pane. Follow the steps, and then select Create.

How do I pull audit logs? ›

View audit log reports
  1. Click Settings. ...
  2. Click Audit log reports in the Site Collection Administration section.
  3. Select the report that you want, such as Deletion on the View Auditing Reports page, .
  4. Type a URL or Browse to the library where you want to save the report and then click OK.

What is SM19 and SM20 in SAP? ›

Through SM19 transaction it's possible to set filters depending on the user. Subsequently through the transaction SM20 or SM20N it will be possible to read the output and though the transaction SM18 to delete files (only files older than three days can be deleted).

What are the prerequisites for configuring audit logging? ›

8.4. 5.5 Configuring Audit Logging Characteristics
  • Naming Conventions for Audit Log Files.
  • Selecting Audit Log File Format.
  • Enabling the Audit Log Flush Task.
  • Adding Query Statistics for Outlier Detection.
  • Compressing Audit Log Files.
  • Encrypting Audit Log Files.
  • Manually Uncompressing and Decrypting Audit Log Files.

What is the Tcode for audit log in SAP? ›

You can read the log using the transaction SM20.

How to configure Office 365 audit log? ›

Enabling Security Audit Logging in Microsoft Office 365
  1. From the left hand panel click Search > Audit log search.
  2. If you see "Turn on auditing" on the next screen, click it - see screenshot below. Note: if you don't see this button, that means auditing is already enabled and you're good to go!
Dec 8, 2022

Where are 365 audit logs? ›

To run an audit log search:

In the Security & Compliance Center, click Search, Audit log search. The main criteria to specify are: Activities — There are over 100 of these, so they have been grouped into related activities.

How do I view server audit logs? ›

Viewing SQL server Audit logs
  1. Navigate to SQL Server Management Studio >> Object Explorer >> Security.
  2. Right-click the audit object that you want to view and select View Audit Logs from the dropdown box.

How do I export search results in Salesforce? ›

Export Your Query Results
  1. On the Queries tab, create a query or select a saved one.
  2. Run the query.
  3. To download the query results locally, select Download. ...
  4. To export all the data, click Export To and select the format.
  5. To export on a scheduled basis, click Scheduled Export. ...
  6. Save your work.

How do I export a log file from Splunk? ›

Export data using Splunk Web
  1. After you run a search, report, or pivot, click the Export button. The Export button is one of the Search action buttons. ...
  2. Click Format and select the format that you want the search results to be exported in. ...
  3. Optional. ...
  4. Optional. ...
  5. Click Export to save the job events in the export file.

How do I export logs? ›

How to export event viewer logs?
  1. Open Event Viewer (Run → eventvwr. ...
  2. Locate the log to be exported.
  3. Select the logs that you want to export, right-click on them and select "Save All Events As".
  4. Enter a file name that includes the log type and the server it was exported from.
  5. Save as a CSV (Comma Separated Value) file.

How do I export searches from embase? ›

To export all the results, click on the dropdown for Select number of items, choose the entry is the same as the number of results. Click Export. Select “RIS format (Mendeley, EndNote)” as your format, then click the Export button. When your data is ready, download the file and save it to the relevant folder.

Top Articles
4 Tips That Will Make You Reconsider Your Money Goals
How To Budget Money On Low Income For A Family of Five
123Movies Encanto
Palm Coast Permits Online
Libiyi Sawsharpener
Walgreens Pharmqcy
Euro (EUR), aktuální kurzy měn
Coffman Memorial Union | U of M Bookstores
Es.cvs.com/Otchs/Devoted
Practical Magic 123Movies
What Auto Parts Stores Are Open
Arrests reported by Yuba County Sheriff
Teamexpress Login
Fnv Turbo
Best Cav Commanders Rok
Hardly Antonyms
Insidekp.kp.org Hrconnect
The Witcher 3 Wild Hunt: Map of important locations M19
Moparts Com Forum
Slope Tyrones Unblocked Games
Www Craigslist Milwaukee Wi
Labby Memorial Funeral Homes Leesville Obituaries
Zoe Mintz Adam Duritz
X-Chromosom: Aufbau und Funktion
Www Craigslist Com Bakersfield
Hewn New Bedford
Deshuesadero El Pulpo
Cal State Fullerton Titan Online
Paradise Point Animal Hospital With Veterinarians On-The-Go
Page 2383 – Christianity Today
Deepwoken: Best Attunement Tier List - Item Level Gaming
Robert A McDougal: XPP Tutorial
Kacey King Ranch
Storelink Afs
The Hoplite Revolution and the Rise of the Polis
NIST Special Publication (SP) 800-37 Rev. 2 (Withdrawn), Risk Management Framework for Information Systems and Organizations: A System Life Cycle Approach for Security and Privacy
Sedano's Supermarkets Expands to Orlando - Sedano's Supermarkets
Tributes flow for Soundgarden singer Chris Cornell as cause of death revealed
Lichen - 1.17.0 - Gemsbok! Antler Windchimes! Shoji Screens!
Dadeclerk
Thanksgiving Point Luminaria Promo Code
Daly City Building Division
Noaa Marine Weather Forecast By Zone
This 85-year-old mom co-signed her daughter's student loan years ago. Now she fears the lender may take her house
Lcwc 911 Live Incident List Live Status
Isabella Duan Ahn Stanford
Is Ameriprise A Pyramid Scheme
John Wick: Kapitel 4 (2023)
Mawal Gameroom Download
Rise Meadville Reviews
Epower Raley's
Palmyra Authentic Mediterranean Cuisine مطعم أبو سمرة
Latest Posts
Article information

Author: Corie Satterfield

Last Updated:

Views: 6689

Rating: 4.1 / 5 (62 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Corie Satterfield

Birthday: 1992-08-19

Address: 850 Benjamin Bridge, Dickinsonchester, CO 68572-0542

Phone: +26813599986666

Job: Sales Manager

Hobby: Table tennis, Soapmaking, Flower arranging, amateur radio, Rock climbing, scrapbook, Horseback riding

Introduction: My name is Corie Satterfield, I am a fancy, perfect, spotless, quaint, fantastic, funny, lucky person who loves writing and wants to share my knowledge and understanding with you.