Get activityStatistics


APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported.

Get the properties of an activityStatistics object for a user.

You can get the properties of a type of activityStatistics for the specified user and date range. You can specify the type of statistics and date range by using the supported format of the activity id property for id in the query.


One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

Permission type Permissions (from least to most privileged)
Delegated (work or school account) Analytics.Read
Delegated (personal Microsoft account) Not supported.
Application Not supported.

HTTP request

GET /me/analytics/activitystatistics/{id}
GET /users/{id|userPrincipalName}/analytics/activitystatistics/{id}

Optional query parameters

This method does not support optional query parameters to customize the response.

Request headers

Name Description
Authorization Bearer {token}

Request body

Do not supply a request body for this method.


If successful, this method returns a 200 OK response code and the requested type of activity statistics, which is one of the following resources derived from activityStatistics:{Call, Chat, Email, Focus, and Meeting}.



The following example requests statistics of the type emailActivityStatistics of the signed-in user, for the date range between 2019-06-16 and 2019-06-17. For more information about the general id property format, see activity id property.



The following is an example of the response that gets activity statistics of a signed-in user for a specific activity and day.

HTTP/1.1 200 OK

    "@odata.context": "$metadata#activitystatistics/$entity",
    "@odata.type": "#microsoft.graph.emailActivityStatistics",
    "activity": "Email",
    "startDate": "2019-06-16",
    "endDate": "2019-06-17",
    "id": "email_2019-06-16_2019-06-17",
    "timeZoneUsed": "Pacific Standard Time",
    "duration": "PT0S",
    "afterHours": "PT0S",
    "readEmail": "PT0S",
    "sentEmail": "PT0S"