Forum Discussion
swarada-jalukar
Dec 11, 2024Copper Contributor
Need Information on Microsoft Teams O365 Management API
Hi Community,
I was exploring the Office 365 Management Activity API documentation-
and came across a few queries. I hope someone can help clarify these:
Maximum Volume of Data: What is the maximum volume of data (e.g., MB/GB per day) that we can retrieve using the Office 365 Management API for Microsoft Teams? Is there any specific limit documented?
Filtering Logs by Workload: When sending requests to the Office 365 Management API, how can I fetch logs specific to Microsoft Teams? I tried applying the filter Workload: MicrosoftTeams in the request, but it also returned logs for other workloads. Below is the API URL I used for the request:
https://manage.office.com/api/v1.0/<TENANT-ID>/activity/feed/audit/<contentID>
I checked the documentation but couldn’t find specific guidance on these points. Can anyone provide insights or share examples of how to resolve these issues? Thank you in advance!
- swarada-jalukarCopper Contributor
Also, would like to know about the expected volume of data that this API will generate or handle?
Kidd_Ipcan you please help here in case of above and this query?There is NO related documentation of the specified limit on the volume of data that can be retrieved per day using the Office 365 Management API for Microsoft Teams, btw, may consider leveraging Audit to fetch logs:
- Retrieve the logs: Use the API to get the logs.
- Filter the results: Programmatically filter the logs to include only those related to Microsoft Teams.
import requests # Replace with your tenant ID and content ID tenant_id = '<TENANT-ID>' content_id = '<contentID>' url = f'https://manage.office.com/api/v1.0/{tenant_id}/activity/feed/audit/{content_id}' # Make the API request response = requests.get(url, headers={'Authorization': 'Bearer <ACCESS_TOKEN>'}) logs = response.json() # Filter logs for Microsoft Teams teams_logs = [log for log in logs if log['Workload'] == 'MicrosoftTeams'] # Process the filtered logs for log in teams_logs: print(log)