How to get Teams Audit log using Office 365 Management Activity API

Rohith Reddy Challa 1 Reputation point
2021-12-15T13:41:54.967+00:00

Hi,

I need to get recent audit data of the Teams and SharePoint daily. I am able to get SharePoint audit data with the help of the Office 365 Management Activity API by subscribing to Audit.SharePoint but I am unable to get Teams Audit data even though I subscribed for Audit.General as the official article Office 365 Management Activity API reference | Microsoft Learn , mentions Audit.General includes all other workloads not included in the previous content types.

Please help me to get the Teams Activity data.

Thank you in advance.

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
9,627 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,634 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Marilee Turscak-MSFT 36,411 Reputation points Microsoft Employee
    2021-12-15T23:32:58.157+00:00

    Audit.General is the correct one to get Teams data, so it sounds like you subscribed to the correct one.

    Some additional steps to confirm:

    1) Make sure that you have enabled unified audit logging for your O365 organization.
    2) Add Office 365 Management API permissions to Admin consent for the tenant with ActivityFeed.Read.
    3) Then, search the audit log.

    If you want to list the data programmatically, you can follow the step-by-step blog post by Rabia Williams. You can refer to the teams schema for information about specific attributes.

    If you are unable to see certain events there could be permissions that are missing. If you are still having this issue let me know and I'll get the right people from the product team looped in to help out.

    0 comments No comments