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- https://learn.microsoft.com/en-us/office/office-365-management-api/office-365-management-activity-api-reference ...
swarada-jalukar
Dec 16, 2024Copper 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?
Kidd_Ip
Dec 17, 2024MVP
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)