url = "https://api.interfaces.records.teams.microsoft.com/Teams.VoiceAnalytics/getanalytics"
headers = {
"Authorization": f"Bearer {access_token}",
"Content-Type": "application/json"
}
params = {
'startDate': "2025-01-01", #start_date, # Data di inizio
'endDate': "2025-01-31", # Data di fine
#'metrics': 'PSTNTotalMinutes,TotalCallCount', # Misure da includere
#'dimensions': 'DocumentId,ConferenceId,DialogId,UserStartTimeUTC,EndTime,Duration,AutoAttendantChainStartTime,AutoAttendantIdentity,AutoAttendantDirectorySearchMethod,AutoAttendantTransferAction,AutoAttendantCallResult,AutoAttendantCallFlow,AutoAttendantCallerActionCounts,AutoAttendantChainDurationInSecs,AutoAttendantChainIndex,AutoAttendantCount,PSTNConnectivityType' # Dimensioni da includere
#'metrics': ",".join(Measurements.keys()), # Chiavi originali delle metriche,
#'dimensions': ",".join(Dimensions.keys()) # Chiavi originali delle dimensioni
}
I run this call after getting the token with scope
scopes = ["https://graph.microsoft.com/.default"]
but it always comes back to me "HTTPError: 403 Client Error: Forbidden for url: https://api.interfaces.records.teams.microsoft.com/Teams.VoiceAnalytics/getanalytics"
Why ?