Share via

Export Audit Logs

Rising Flight 6,456 Reputation points
2020-09-24T04:56:19.533+00:00

Hi All
I want to export Audit Logs from Azure AD ie. who has created/deleted a user, who created/deleted group, i want to export all the admin audit logs from powershell to a csv file, experts guide me on this.

Microsoft Security | Microsoft Entra | Microsoft Entra ID
Microsoft Security | Microsoft Entra | Other

Answer accepted by question author

Vipul Sparsh 16,336 Reputation points Microsoft Employee Moderator
2020-09-24T06:25:11.523+00:00

@Rising Flight Thanks for reaching out. Here are the steps which you need to follow

1) You need to import the AzureAD Preview module and connect to Azure AD account

27887-1.png

2) Next you need to run : Get-AzureADAuditDirectoryLogs | Export-Csv -path C:\Reports.csv

27830-2.png

Once you have the reports, you can then filter it for Different ActivityDisplayName Like : Add user, update user or with any other requirement.


If the suggested response helped you resolve your issue, please do not forget to accept the response as Answer and "Up-Vote" for the answer that helped you for benefit of the community.

Was this answer helpful?

0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Rising Flight 6,456 Reputation points
    2020-09-24T10:14:13.07+00:00

    will the below syntax

    Get-AzureADAuditDirectoryLogs -Resultsize unlimited -StartDate 09/20/2020 00:00 -EndDate 09/23/2020 23:59 | Export-Csv -path C:\Reports.csv

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.