BojanBuhac / M365-Copilot-Audit-Report

M365 Copilot Audit Report is displaying interactions your employees are having with M365 Copilot.
GNU General Public License v3.0
3 stars 2 forks source link

Getting incomplete data and errors when running Copilot_Events #1

Open lucasbrioschi opened 6 days ago

lucasbrioschi commented 6 days ago

image (3) As per the image attached, we have been experiencing some error when executing the command, data was retrieved until April 2024 as there is error preventing the script to retrieve the following months.

BojanBuhac commented 5 days ago

Hi Lucas, Screenshot looks strange, so I suspect there are some issues with the EXO module. Also, I'm assuming you are using the latest version of Powershell 7. Output of the module/script should look something like this

image

Please install latest EXO module manually before running the script -

Install-Module -Name ExchangeOnlineManagement -Force -AllowClobber -Scope CurrentUser

itbriosclu commented 1 day ago

Hi @BojanBuhac, I'm not sure if it is due to the size of our tenant but we have installed all the pre-requisites. PowerShell 7, Latest Exchange Online management module. We connected the exchange online and also limited the connection only logs command to make the script run faster. Connect-ExchangeOnline -CommandName Search-UnifiedAuditLog Changed the log and audit log storage path from script and executed the script. Script did not throw any error initially but it kept changing the the execution time interval soon and it throws following warning. WARNING: There were errors during the search process which might affect the validity of the data. At the completion, it only retrieves less logs. We tested the script multiple times. Every time it script don't retrieve data either in starting or ending. We are sure that we have more logs because we are using copilot for M365 since September 2023.

When checking the script its bring bringing unique values and in unsorted format even though script has sort-object to sort only unique values at then end of retrieving the data.
Below are the log and error screen print. image AuditScriptLog.txt