There is no such API. There was a preview back in the day, but Microsoft hasn't released any public resources that you can leverage to get message trace logs. Use PowerShell instead.
exchange online How Do I Call an API to Obtain Email Tracking Logs?
evan
25
Reputation points
I tried to apply the above way, but it returns
{'error': {'code': 'BadRequest', 'message': "Resource not found for the segment 'messageTrace'.", 'innerError': {'date': '2023-12-07T09:09:05', 'request-id': '5fbffd04-392c-43c6-83b5-1e2c416429c8', 'client-request-id': '5fbffd04-392c-43c6-83b5-1e2c416429c8'}}}
Is there a reference documentation for the API ?