I'm trying to call Read Reports API from MS Graph API in Microsoft Teams but using this API :
https://graph.microsoft.com/v1.0/reports/getTeamsUserActivityUserDetail(period='D7')?$format=application/json
but it gives me the following error:
Unhandled Rejection (Error):
{
"error": {
"code":"S2SUnauthorized",
"message":"Invalid permission."
}
}
I'm using MSAL authentication and Graph client, I did everything exactly the same in the tutorial of Microsoft Graph and I provided the required permission, Registered the App, added everything correctly in Azure and Granted permission by admin, changed them to Application from delegate it works for all other APIs but this API isn't working.