Search-UnifiedAuditLog only returns 90 total records RRS feed

  • Question

  • Hello,

    A few weeks back I was able to use Search-UnifiedAuditLog to export to CSV all records up to the maximum of 5000 if I set -ResultSize. Now it doesn't work. No matter what number I choose I can only get 90 total records or less if I choose a number below 90. Is there somewhere that overrides this? 

    This is what I'm running

    $startDate = (get-date).AddDays(-7).ToString('MM/dd/yyyy')
    $endDate = (get-date).ToString('MM/dd/yyyy')
    Search-UnifiedAuditLog -ResultSize 5000 -StartDate $startDate -EndDate $endDate -RecordType PowerBIAudit | Export-Csv /path/to/folder 

    I'm a global admin on our tenant and I have added myself into the roles required to run that line. It did work but now it has stopped?

    Any help on the matter will be much appreciated.


    • Moved by Bill_Stewart Monday, January 7, 2019 8:15 PM Unanswerable drive-by question
    Monday, November 12, 2018 12:07 AM

All replies