Get recent user activities

Namespace: microsoft.graph

Get recent activities for a given user. This OData function has some default behaviors included to make it operate like a "most recently used" API. The service will query for the most recent historyItems, and then pull those related activities. Activities will be sorted according to the most recent lastModified on the historyItem. This means that activities without historyItems will not be included in the response. The UserActivity.ReadWrite.CreatedByApp permission will also apply extra filtering to the response, so that only activities created by your application are returned. This server-side filtering might result in empty pages if the user is particularly active and other applications have created more recent activities. To get your application's activities, use the nextLink property to paginate.


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) UserActivity.ReadWrite.CreatedByApp
Delegated (personal Microsoft account) UserActivity.ReadWrite.CreatedByApp
Application Not supported.

HTTP request

GET /me/activities/recent

Optional query parameters

This method supports some OData Query Parameters to help customize the response. The following query parameters are supported:

  • $expand for the historyItems navigation property.
  • $top to limit the maximum number of items across pages.
  • $filter on the lastModifiedDateTime property for either activities or historyItems, if expanded.

The following are some examples of supported queries with URL encoding.




Request headers

Name Type Description
Authorization string Bearer {token}. Required.

Request body

Do not specify a request body.


If successful, this method returns the 200 OK response code with the user's recent activities for your application.



The following is an example of the request.



The following is an example of the response.

HTTP/1.1 200 OK
Content-Type: application/json

               "alternateText":"Contoso, Ltd.",
            "displayText":"Contoso How-To: How to Tie a Reef Knot",
            "description":"How to Tie a Reef Knot. A step-by-step visual guide to the art of nautical knot-tying.",
                     "text":"Contoso MainPage"
         "appDisplayName":"Contoso, Ltd.",
            "author":"John Doe",
            "name":"How to Tie a Reef Knot"