Processes in Microsoft 365 for setting up Office apps, redeeming product keys, and activating licenses.
Hello Vaidya , Thanks for the clarification
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello Everyone,
I have a problem: I need to automate the extraction of team user activity reports from the team admin center and store data needs to be S3 bucket in CSV format. For this, I have done app registration and with the help of Python SDK, I was trying to automate the process. But I'm getting the mentioned error.
Error Message:
msgraph.generated.models.o_data_errors.o_data_error.ODataError: APIError 404: None MainError(additional_data={}, code='UnknownError', details=None, inner_error=InnerError(additional_data={'date': datetime.timedelta(seconds=46105)}, client_request_id=6aabfa3e', date=None, odata_type=None, request_id='c5b7ff119'), message='{"error":{"code":"InvalidArgument","message":"The requested function cannot be found."}}', target=None)
The code I was using:
import asyncio
from azure.identity import DeviceCodeCredential
from msgraph import GraphServiceClient
scopes = ['Reports.Read.All']
tenant_id = 'Value from App registration'
client_id = 'Value from App registration'
client_secret = 'Value from App registration'
# azure.identity.aio
credential = DeviceCodeCredential(tenant_id=tenant_id, client_id=client_id, client_secret=client_secret)
graph_client = GraphServiceClient(credential, scopes)
async def get_reports():
await graph_client.reports.get_teams_user_activity_user_detail_with_period(period='D7').get()
asyncio.run(get_reports())
Can anyone please help with the solution?
Thanks in Advance!
Manoj
Processes in Microsoft 365 for setting up Office apps, redeeming product keys, and activating licenses.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Hello Vaidya , Thanks for the clarification
Hi Manoj Kumar Varadharajan,
Good day.
Thank you for connecting with us in Microsoft community.
According to your mentioned description, seems like your concern environment is related to python SDK for teams user activity report which is associated with programming script, would you mind to connecting and placing this query in our dedicated Microsoft Q&A forum community so that relevant members of our community can provide possible information from their side? Because this forum does not support programming script related scenario, but as Microsoft has specific forum resource for certain different support scope and attributes.
Thank you for your valuable time and kind cooperation.
Sincerely,
Darpan