Better way to build reporting on the Audit Log data?

Josh ADM 1 Reputation point
2021-04-06T00:04:48.597+00:00

Hi,

I'm trying to pull records from users using sendAS to send mail from a shared mailbox.

I don't see this as an option from the Microsoft Graph API so I've been using the Office 365 Management API.

With this API, I need to:
Setup a subscription for the data
make an API request to pull a list of contentUris
loop through those contentUris to pull the actual data
sort through the data to find what I want

This data expires every 7 days so I need to pull it weekly and store the data somewhere.

Is there some other way to pull this information? I was able to get what I needed from PowerShell, but was asked to try Flows.

It just seems overly tedious and complicated for something you can easily get across any date range from the GUI version of the audit log.

Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,174 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,455 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Vasil Michev 95,181 Reputation points MVP
    2021-04-06T07:17:25.723+00:00

    For specific events, you're better off using PowerShell and the Search-UnifiedAuditLog cmdlet. Not sure how Flow will help in any way, either with PowerShell or the management APIs.

    0 comments No comments

  2. KyleXu-MSFT 26,206 Reputation points
    2021-04-06T07:37:20.293+00:00

    @Josh ADM

    If you enable mailbox audit log in your organization, you will could find log from mailbox audit log: Mailbox actions for user mailboxes and shared mailboxes

    84728-qa-kyle-15-31-10.png


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.