Created
January 1, 2025 19:53
-
-
Save EastArctica/c81b8e94186f6ca4b3423bb4ec838ec7 to your computer and use it in GitHub Desktop.
Microsoft Purview audit export
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Exports super basic information from a Microsoft Purview audit | |
// I made this because the "Export" button was taking too long | |
// Obviously this only works for the current page you're on | |
// Change as you see fit | |
let str = ''; | |
document.querySelectorAll('div[data-automationid="DetailsRowFields"]').forEach(x => { | |
let time = x.querySelector('[data-automation-key="creationDate"]').innerText; | |
let ip = x.querySelector('[data-automation-key="IPAddress"]').innerText; | |
let user = x.querySelector('[data-automation-key="User"]').innerText; | |
let item = x.querySelector('[data-automation-key="Item"]').innerText; | |
str += `${time}\tby ${user}:\t'${item}'\n` | |
}) | |
console.log(str); | |
copy(str); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment