Microsoft Graph users.userActivity API

The users.userActivity API from Microsoft Graph — 8 operation(s) for users.useractivity.

Operations 14

GET /users/{user-id}/activities Microsoft Graph Get activities from users #
POST /users/{user-id}/activities Microsoft Graph Create new navigation property to activities for users #
GET /users/{user-id}/activities/{userActivity-id} Microsoft Graph Get activities from users #
PATCH /users/{user-id}/activities/{userActivity-id} Microsoft Graph Update the navigation property activities in users #
DELETE /users/{user-id}/activities/{userActivity-id} Microsoft Graph Delete navigation property activities for users #
GET /users/{user-id}/activities/{userActivity-id}/historyItems Microsoft Graph Get historyItems from users #
POST /users/{user-id}/activities/{userActivity-id}/historyItems Microsoft Graph Create new navigation property to historyItems for users #
GET /users/{user-id}/activities/{userActivity-id}/historyItems/{activityHistoryItem-id} Microsoft Graph Get historyItems from users #
PATCH /users/{user-id}/activities/{userActivity-id}/historyItems/{activityHistoryItem-id} Microsoft Graph Update the navigation property historyItems in users #
DELETE /users/{user-id}/activities/{userActivity-id}/historyItems/{activityHistoryItem-id} Microsoft Graph Delete navigation property historyItems for users #
GET /users/{user-id}/activities/{userActivity-id}/historyItems/{activityHistoryItem-id}/activity Microsoft Graph Get activity from users #
GET /users/{user-id}/activities/{userActivity-id}/historyItems/$count Microsoft Graph Get the number of the resource #
GET /users/{user-id}/activities/$count Microsoft Graph Get the number of the resource #
GET /users/{user-id}/activities/recent() Microsoft Graph Invoke function recent #

Documentation

📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/admin?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/agreementacceptance?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/agreement?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/teamsapp?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/application?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/applicationtemplate?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/azure-ad-auditlog-overview?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/authenticationmethodconfiguration?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/authenticationmethodspolicy?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/certificatebasedauthconfiguration?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/chat?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/communications-api-overview?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/complianceapioverview?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/externalconnectors-externalconnection?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/contact?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/contract?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/copilot-overview?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/datapolicyoperation?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/intune-apps-conceptual?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/intune-device-conceptual?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/device?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/directory?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/domaindnsrecord?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/domain?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/drive?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/education-overview?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/employee-experience-overview?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/externalconnectors-external?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/filter-query-parameter
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/excel?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/grouplifecyclepolicy?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/groups-overview?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/groupsetting?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/groupsettingtemplate?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/identitycontainer?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/informationprotection?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/invitation?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/users?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/oauth2permissiongrant?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/organization?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/resourcespecificpermissiongrant?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/place?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/planner-overview?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/policy-overview?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/print?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/privacy?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/report?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/rolemanagement?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/schemaextension?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/scopedrolemembership?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/search-api-overview?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/security-api-overview?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/serviceprincipal?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/shares?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/sharepoint?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/solutions-overview?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/filestorage?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/subscribedsku?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/subscription?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/teams-api-overview?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/teamwork?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/tenantrelationship?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/user?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/auth/auth-concepts
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/workplace?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/overview?view=graph-rest-1.0
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/sitepage?view=graph-rest-1.0

Specifications

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/microsoft-graph-users-useractivity-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

microsoft-graph-users-useractivity-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Microsoft Graph Admin Admin.admin Users.user Activity API
  description: 'Microsoft Graph API for managing administrative resources in Microsoft Entra ID.

    This API enables administrators to manage Microsoft Edge browser settings, Internet Explorer mode configurations,

    site lists, shared browser sites, Microsoft 365 Apps installation options, people insights, service announcements,

    SharePoint settings, Copilot administration, directory administrative units, and admin consent policies.'
  version: 1.0.0
  contact:
    name: Microsoft Graph API Support
    url: https://developer.microsoft.com/graph
servers:
- url: https://graph.microsoft.com/v1.0
  description: Microsoft Graph API v1.0 endpoint
tags:
- name: users.userActivity
  x-ms-docs-toc-type: page
paths:
  /users/{user-id}/activities:
    description: Provides operations to manage the activities property of the microsoft.graph.user entity.
    parameters:
    - name: user-id
      in: path
      description: The unique identifier of user
      required: true
      schema:
        type: string
      x-ms-docs-key-type: user
    get:
      tags:
      - users.userActivity
      summary: Microsoft Graph Get activities from users
      description: The user's activities across devices. Read-only. Nullable.
      operationId: users.ListActivities
      parameters:
      - $ref: '#/components/parameters/top'
      - $ref: '#/components/parameters/skip'
      - $ref: '#/components/parameters/search'
      - $ref: '#/components/parameters/filter'
      - $ref: '#/components/parameters/count'
      - name: $orderby
        in: query
        description: Order items by property values
        style: form
        explode: false
        schema:
          uniqueItems: true
          type: array
          items:
            type: string
      - name: $select
        in: query
        description: Select properties to be returned
        style: form
        explode: false
        schema:
          uniqueItems: true
          type: array
          items:
            type: string
      - name: $expand
        in: query
        description: Expand related entities
        style: form
        explode: false
        schema:
          uniqueItems: true
          type: array
          items:
            type: string
      responses:
        2XX:
          $ref: '#/components/responses/microsoft.graph.userActivityCollectionResponse'
        4XX:
          $ref: '#/components/responses/error'
        5XX:
          $ref: '#/components/responses/error'
      x-ms-pageable:
        nextLinkName: '@odata.nextLink'
        operationName: listMore
      x-ms-docs-operation-type: operation
    post:
      tags:
      - users.userActivity
      summary: Microsoft Graph Create new navigation property to activities for users
      operationId: users.CreateActivities
      requestBody:
        description: New navigation property
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/microsoft.graph.userActivity'
        required: true
      responses:
        2XX:
          description: Created navigation property.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/microsoft.graph.userActivity'
        4XX:
          $ref: '#/components/responses/error'
        5XX:
          $ref: '#/components/responses/error'
      x-ms-docs-operation-type: operation
  /users/{user-id}/activities/{userActivity-id}:
    description: Provides operations to manage the activities property of the microsoft.graph.user entity.
    parameters:
    - name: user-id
      in: path
      description: The unique identifier of user
      required: true
      schema:
        type: string
      x-ms-docs-key-type: user
    - name: userActivity-id
      in: path
      description: The unique identifier of userActivity
      required: true
      schema:
        type: string
      x-ms-docs-key-type: userActivity
    get:
      tags:
      - users.userActivity
      summary: Microsoft Graph Get activities from users
      description: The user's activities across devices. Read-only. Nullable.
      operationId: users.GetActivities
      parameters:
      - name: $select
        in: query
        description: Select properties to be returned
        style: form
        explode: false
        schema:
          uniqueItems: true
          type: array
          items:
            type: string
      - name: $expand
        in: query
        description: Expand related entities
        style: form
        explode: false
        schema:
          uniqueItems: true
          type: array
          items:
            type: string
      responses:
        2XX:
          description: Retrieved navigation property
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/microsoft.graph.userActivity'
        4XX:
          $ref: '#/components/responses/error'
        5XX:
          $ref: '#/components/responses/error'
      x-ms-docs-operation-type: operation
    patch:
      tags:
      - users.userActivity
      summary: Microsoft Graph Update the navigation property activities in users
      operationId: users.UpdateActivities
      requestBody:
        description: New navigation property values
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/microsoft.graph.userActivity'
        required: true
      responses:
        2XX:
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/microsoft.graph.userActivity'
        4XX:
          $ref: '#/components/responses/error'
        5XX:
          $ref: '#/components/responses/error'
      x-ms-docs-operation-type: operation
    delete:
      tags:
      - users.userActivity
      summary: Microsoft Graph Delete navigation property activities for users
      operationId: users.DeleteActivities
      parameters:
      - name: If-Match
        in: header
        description: ETag
        schema:
          type: string
      responses:
        '204':
          description: Success
        4XX:
          $ref: '#/components/responses/error'
        5XX:
          $ref: '#/components/responses/error'
      x-ms-docs-operation-type: operation
  /users/{user-id}/activities/{userActivity-id}/historyItems:
    description: Provides operations to manage the historyItems property of the microsoft.graph.userActivity entity.
    parameters:
    - name: user-id
      in: path
      description: The unique identifier of user
      required: true
      schema:
        type: string
      x-ms-docs-key-type: user
    - name: userActivity-id
      in: path
      description: The unique identifier of userActivity
      required: true
      schema:
        type: string
      x-ms-docs-key-type: userActivity
    get:
      tags:
      - users.userActivity
      summary: Microsoft Graph Get historyItems from users
      description: Optional. NavigationProperty/Containment; navigation property to the activity's historyItems.
      operationId: users.activities.ListHistoryItems
      parameters:
      - $ref: '#/components/parameters/top'
      - $ref: '#/components/parameters/skip'
      - $ref: '#/components/parameters/search'
      - $ref: '#/components/parameters/filter'
      - $ref: '#/components/parameters/count'
      - name: $orderby
        in: query
        description: Order items by property values
        style: form
        explode: false
        schema:
          uniqueItems: true
          type: array
          items:
            type: string
      - name: $select
        in: query
        description: Select properties to be returned
        style: form
        explode: false
        schema:
          uniqueItems: true
          type: array
          items:
            type: string
      - name: $expand
        in: query
        description: Expand related entities
        style: form
        explode: false
        schema:
          uniqueItems: true
          type: array
          items:
            type: string
      responses:
        2XX:
          $ref: '#/components/responses/microsoft.graph.activityHistoryItemCollectionResponse'
        4XX:
          $ref: '#/components/responses/error'
        5XX:
          $ref: '#/components/responses/error'
      x-ms-pageable:
        nextLinkName: '@odata.nextLink'
        operationName: listMore
      x-ms-docs-operation-type: operation
    post:
      tags:
      - users.userActivity
      summary: Microsoft Graph Create new navigation property to historyItems for users
      operationId: users.activities.CreateHistoryItems
      requestBody:
        description: New navigation property
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/microsoft.graph.activityHistoryItem'
        required: true
      responses:
        2XX:
          description: Created navigation property.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/microsoft.graph.activityHistoryItem'
        4XX:
          $ref: '#/components/responses/error'
        5XX:
          $ref: '#/components/responses/error'
      x-ms-docs-operation-type: operation
  /users/{user-id}/activities/{userActivity-id}/historyItems/{activityHistoryItem-id}:
    description: Provides operations to manage the historyItems property of the microsoft.graph.userActivity entity.
    parameters:
    - name: user-id
      in: path
      description: The unique identifier of user
      required: true
      schema:
        type: string
      x-ms-docs-key-type: user
    - name: userActivity-id
      in: path
      description: The unique identifier of userActivity
      required: true
      schema:
        type: string
      x-ms-docs-key-type: userActivity
    - name: activityHistoryItem-id
      in: path
      description: The unique identifier of activityHistoryItem
      required: true
      schema:
        type: string
      x-ms-docs-key-type: activityHistoryItem
    get:
      tags:
      - users.userActivity
      summary: Microsoft Graph Get historyItems from users
      description: Optional. NavigationProperty/Containment; navigation property to the activity's historyItems.
      operationId: users.activities.GetHistoryItems
      parameters:
      - name: $select
        in: query
        description: Select properties to be returned
        style: form
        explode: false
        schema:
          uniqueItems: true
          type: array
          items:
            type: string
      - name: $expand
        in: query
        description: Expand related entities
        style: form
        explode: false
        schema:
          uniqueItems: true
          type: array
          items:
            type: string
      responses:
        2XX:
          description: Retrieved navigation property
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/microsoft.graph.activityHistoryItem'
        4XX:
          $ref: '#/components/responses/error'
        5XX:
          $ref: '#/components/responses/error'
      x-ms-docs-operation-type: operation
    patch:
      tags:
      - users.userActivity
      summary: Microsoft Graph Update the navigation property historyItems in users
      operationId: users.activities.UpdateHistoryItems
      requestBody:
        description: New navigation property values
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/microsoft.graph.activityHistoryItem'
        required: true
      responses:
        2XX:
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/microsoft.graph.activityHistoryItem'
        4XX:
          $ref: '#/components/responses/error'
        5XX:
          $ref: '#/components/responses/error'
      x-ms-docs-operation-type: operation
    delete:
      tags:
      - users.userActivity
      summary: Microsoft Graph Delete navigation property historyItems for users
      operationId: users.activities.DeleteHistoryItems
      parameters:
      - name: If-Match
        in: header
        description: ETag
        schema:
          type: string
      responses:
        '204':
          description: Success
        4XX:
          $ref: '#/components/responses/error'
        5XX:
          $ref: '#/components/responses/error'
      x-ms-docs-operation-type: operation
  /users/{user-id}/activities/{userActivity-id}/historyItems/{activityHistoryItem-id}/activity:
    description: Provides operations to manage the activity property of the microsoft.graph.activityHistoryItem entity.
    parameters:
    - name: user-id
      in: path
      description: The unique identifier of user
      required: true
      schema:
        type: string
      x-ms-docs-key-type: user
    - name: userActivity-id
      in: path
      description: The unique identifier of userActivity
      required: true
      schema:
        type: string
      x-ms-docs-key-type: userActivity
    - name: activityHistoryItem-id
      in: path
      description: The unique identifier of activityHistoryItem
      required: true
      schema:
        type: string
      x-ms-docs-key-type: activityHistoryItem
    get:
      tags:
      - users.userActivity
      summary: Microsoft Graph Get activity from users
      description: Optional. NavigationProperty/Containment; navigation property to the associated activity.
      operationId: users.activities.historyItems.GetActivity
      parameters:
      - name: $select
        in: query
        description: Select properties to be returned
        style: form
        explode: false
        schema:
          uniqueItems: true
          type: array
          items:
            type: string
      - name: $expand
        in: query
        description: Expand related entities
        style: form
        explode: false
        schema:
          uniqueItems: true
          type: array
          items:
            type: string
      responses:
        2XX:
          description: Retrieved navigation property
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/microsoft.graph.userActivity'
        4XX:
          $ref: '#/components/responses/error'
        5XX:
          $ref: '#/components/responses/error'
      x-ms-docs-operation-type: operation
  /users/{user-id}/activities/{userActivity-id}/historyItems/$count:
    description: Provides operations to count the resources in the collection.
    parameters:
    - name: user-id
      in: path
      description: The unique identifier of user
      required: true
      schema:
        type: string
      x-ms-docs-key-type: user
    - name: userActivity-id
      in: path
      description: The unique identifier of userActivity
      required: true
      schema:
        type: string
      x-ms-docs-key-type: userActivity
    get:
      tags:
      - users.userActivity
      summary: Microsoft Graph Get the number of the resource
      operationId: users.activities.historyItems.GetCount-625e
      parameters:
      - $ref: '#/components/parameters/search'
      - $ref: '#/components/parameters/filter'
      responses:
        2XX:
          $ref: '#/components/responses/ODataCountResponse'
        4XX:
          $ref: '#/components/responses/error'
        5XX:
          $ref: '#/components/responses/error'
  /users/{user-id}/activities/$count:
    description: Provides operations to count the resources in the collection.
    parameters:
    - name: user-id
      in: path
      description: The unique identifier of user
      required: true
      schema:
        type: string
      x-ms-docs-key-type: user
    get:
      tags:
      - users.userActivity
      summary: Microsoft Graph Get the number of the resource
      operationId: users.activities.GetCount-39cc
      parameters:
      - $ref: '#/components/parameters/search'
      - $ref: '#/components/parameters/filter'
      responses:
        2XX:
          $ref: '#/components/responses/ODataCountResponse'
        4XX:
          $ref: '#/components/responses/error'
        5XX:
          $ref: '#/components/responses/error'
  /users/{user-id}/activities/recent():
    description: Provides operations to call the recent method.
    parameters:
    - name: user-id
      in: path
      description: The unique identifier of user
      required: true
      schema:
        type: string
      x-ms-docs-key-type: user
    get:
      tags:
      - users.userActivity
      summary: Microsoft Graph Invoke function recent
      description: 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 queries for the most recent activityHistoryItems, and then pull those related activities. Activities are sorted according to the most recent lastModified on the activityHistoryItem. This means that activities without activityHistoryItems won't 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 active and other applications have created more recent activities. To get your application's activities, use the nextLink property to paginate.
      externalDocs:
        description: Find more info here
        url: https://learn.microsoft.com/graph/api/projectrome-get-recent-activities?view=graph-rest-1.0
      operationId: users.user.activities.recent
      parameters:
      - $ref: '#/components/parameters/top'
      - $ref: '#/components/parameters/skip'
      - $ref: '#/components/parameters/search'
      - $ref: '#/components/parameters/filter'
      - $ref: '#/components/parameters/count'
      - name: $select
        in: query
        description: Select properties to be returned
        style: form
        explode: false
        schema:
          uniqueItems: true
          type: array
          items:
            type: string
      - name: $orderby
        in: query
        description: Order items by property values
        style: form
        explode: false
        schema:
          uniqueItems: true
          type: array
          items:
            type: string
      - name: $expand
        in: query
        description: Expand related entities
        style: form
        explode: false
        schema:
          uniqueItems: true
          type: array
          items:
            type: string
      responses:
        2XX:
          description: Success
          content:
            application/json:
              schema:
                title: Collection of userActivity
                type: object
                allOf:
                - $ref: '#/components/schemas/BaseCollectionPaginationCountResponse'
                - type: object
                  properties:
                    value:
                      type: array
                      items:
                        $ref: '#/components/schemas/microsoft.graph.userActivity'
        4XX:
          $ref: '#/components/responses/error'
        5XX:
          $ref: '#/components/responses/error'
      x-ms-docs-operation-type: function
      x-ms-pageable:
        nextLinkName: '@odata.nextLink'
        operationName: listMore
components:
  schemas:
    ODataCountResponse:
      type: integer
      format: int32
    microsoft.graph.ODataErrors.ErrorDetails:
      required:
      - code
      - message
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        target:
          type: string
          nullable: true
    microsoft.graph.userActivity:
      allOf:
      - $ref: '#/components/schemas/microsoft.graph.entity'
      - title: userActivity
        required:
        - '@odata.type'
        type: object
        properties:
          activationUrl:
            type: string
            description: Required. URL used to launch the activity in the best native experience represented by the appId. Might launch a web-based app if no native app exists.
          activitySourceHost:
            type: string
            description: 'Required. URL for the domain representing the cross-platform identity mapping for the app. Mapping is stored either as a JSON file hosted on the domain or configurable via Windows Dev Center. The JSON file is named cross-platform-app-identifiers and is hosted at root of your HTTPS domain, either at the top level domain or include a sub domain. For example: https://contoso.com or https://myapp.contoso.com but NOT https://myapp.contoso.com/somepath. You must have a unique file and domain (or sub domain) per cross-platform app identity. For example, a separate file and domain is needed for Word vs. PowerPoint.'
          appActivityId:
            type: string
            description: Required. The unique activity ID in the context of the app - supplied by caller and immutable thereafter.
          appDisplayName:
            type: string
            description: Optional. Short text description of the app used to generate the activity for use in cases when the app is not installed on the user’s local device.
            nullable: true
          contentInfo:
            description: Optional. A custom piece of data - JSON-LD extensible description of content according to schema.org syntax.
          contentUrl:
            type: string
            description: Optional. Used in the event the content can be rendered outside of a native or web-based app experience (for example, a pointer to an item in an RSS feed).
            nullable: true
          createdDateTime:
            pattern: ^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$
            type: string
            description: Set by the server. DateTime in UTC when the object was created on the server.
            format: date-time
            nullable: true
          expirationDateTime:
            pattern: ^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$
            type: string
            description: Set by the server. DateTime in UTC when the object expired on the server.
            format: date-time
            nullable: true
          fallbackUrl:
            type: string
            description: Optional. URL used to launch the activity in a web-based app, if available.
            nullable: true
          lastModifiedDateTime:
            pattern: ^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$
            type: string
            description: Set by the server. DateTime in UTC when the object was modified on the server.
            format: date-time
            nullable: true
          status:
            anyOf:
            - $ref: '#/components/schemas/microsoft.graph.status'
            - type: object
              nullable: true
            description: 'Set by the server. A status code used to identify valid objects. Values: active, updated, deleted, ignored.'
          userTimezone:
            type: string
            description: Optional. The timezone in which the user's device used to generate the activity was located at activity creation time; values supplied as Olson IDs in order to support cross-platform representation.
            nullable: true
          visualElements:
            $ref: '#/components/schemas/microsoft.graph.visualInfo'
          historyItems:
            type: array
            items:
              $ref: '#/components/schemas/microsoft.graph.activityHistoryItem'
            description: Optional. NavigationProperty/Containment; navigation property to the activity's historyItems.
            x-ms-navigationProperty: true
          '@odata.type':
            type: string
      x-ms-discriminator-value: '#microsoft.graph.userActivity'
    microsoft.graph.activityHistoryItemCollectionResponse:
      title: Collection of activityHistoryItem
      type: object
      allOf:
      - $ref: '#/components/schemas/BaseCollectionPaginationCountResponse'
      - type: object
        properties:
          value:
            type: array
            items:
              $ref: '#/components/schemas/microsoft.graph.activityHistoryItem'
    microsoft.graph.imageInfo:
      title: imageInfo
      required:
      - '@odata.type'
      type: object
      properties:
        addImageQuery:
          type: boolean
          description: Optional; parameter used to indicate the server is able to render image dynamically in response to parameterization. For example – a high contrast image
          nullable: true
        alternateText:
          type: string
          description: Optional; alt-text accessible content for the image
          nullable: true
        alternativeText:
          type: string
          nullable: true
        iconUrl:
          type: string
          description: Optional; URI that points to an icon which represents the application used to generate the activity
          nullable: true
        '@odata.type':
          type: string
    microsoft.graph.visualInfo:
      title: visualInfo
      required:
      - '@odata.type'
      type: object
      properties:
        attribution:
          anyOf:
          - $ref: '#/components/schemas/microsoft.graph.imageInfo'
          - type: object
            nullable: true
          description: Optional. JSON object used to represent an icon which represents the application used to generate the activity
        backgroundColor:
          type: string
          description: Optional. Background color used to render the activity in the UI - brand color for the application source of the activity. Must be a valid hex color
          nullable: true
        content:
          description: Optional. Custom piece of data - JSON object used to provide custom content to render the activity in the Windows Shell UI
        description:
          type: string
          description: 'Optional. Longer text description of the user''s unique activity (example: document name, first sentence, and/or metadata)'
          nullable: true
        displayText:
          type: string
          description: Required. Short text description of the user's unique activity (for example, document name in cases where an activity refers to document creation)
        '@odata.type':
          type: string
    microsoft.graph.ODataErrors.InnerError:
      title: InnerError
      required:
      - '@odata.type'
      type: object
      properties:
        request-id:
          type: string
          description: Request Id as tracked internally by the service
          nullable: true
        client-request-id:
          type: string
          description: Client request Id as sent by the client application.
          nullable: true
        date:
          pattern: ^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$
          type: string
          description: Date when the error occured.
          format: date-time
          nullable: true
        '@odata.type':
          type: string
    microsoft.graph.status:
      title: status
      enum:
      - active
      - updated
      - deleted
      - ignored
      - unknownFutureValue
      type: string
    microsoft.graph.userActivityCollectionResponse:
      title: Collection of userActivity
      type: object
      allOf:
      - $ref: '#/components/schemas/BaseCollectionPaginationCountResponse'
      - type: object
        properties:
          value:
            type: array
            items:
              $ref: '#/components/schemas/microsoft.graph.userActivity'
    microsoft.graph.ODataErrors.MainError:
      required:
      - code
      - message
      type: object
      properties:
        code:
          type: string
        message:
          type: string
          x-ms-primary-error-message: true
        target:
          type: string
          nullable: true
        details:
          type: array
          items:
            $ref: '#/components/schemas/microsoft.graph.ODataErrors.ErrorDetails'
        innerError:
          $ref: '#/components/schemas/microsoft.graph.ODataErrors.InnerError'
    microsoft.graph.activityHistoryItem:
      allOf:
      - $ref: '#/components/schemas/microsoft.graph.entity'
      - title: activityHistoryItem
        required:
        - '@odata.type'
        type: object
        properties:
          activeDurationSeconds:
            maximum: 2147483647
            minimum: -2147483648
            type: number
            description: Optional. The duration of active user engagement. if not supplied, this is calculated from the startedDateTime and lastActiveDateTime.
            format: int32
            nullable: true
          createdDateTime:
            pattern: ^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$
            type: string
            description: Set by the server. DateTime in UTC when the object was created on the server.
            format: date-time
            nullable: true
          expirationDateTime:
            pattern: ^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$
            type: string
            description: Optional. UTC DateTime when the activityHistoryItem will undergo hard-delete. Can be set by the client.
            format: date-time
            nullable: true
          lastActiveDateTime:
            pattern: ^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$
            type: string
            description: Optional. UTC DateTime when the activityHistoryItem (activity session) was last understood as active or finished - if null, activityHistoryItem status should be Ongoing.
            format: date-time
            nullable: true
          lastModifiedDateTime:
            pattern: ^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$
            type: string
            description: Set by the server. DateTime in UTC when the object was modified on the server.
            format: date-time
            nullable: true
          startedDateTime:
            pattern: ^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$
            type: string
            description: Required. UTC DateTime when the activityHistoryItem (activity session) was started. Required for timeline history.
            format: date-time
          status:
            anyOf:
            - $ref: '#/components/schemas/microsoft.graph.status'
            - type: object
              nullable: true
            description: 'Set by the server. A status code used to identify valid objects. Values: active, updated, deleted, ignored.'
          userTimezone:
            type: string
            description: Optional. The timezone in which the user's device used to generate the activity was located at activity creation time. Values supplied as Olson IDs in order to support cross-platform representation.
            nullable: true
          activity:
            $ref: '#/components/schemas/microsoft.graph.userActivity'
          '@odata.type':
            type: string
      x-ms-discriminator-value: '#microsoft.graph.activityHistoryItem'
    BaseCollectionPaginationCountResponse:
      title: Base collection pagination and count responses
      type: object
      properties:
        '@odata.count':
          type: integer
          format: int64
          nullable: true
        '@odata.nextLink':
          type: string
          nullable: true
    microsoft.graph.ODataErrors.ODataError:
      required:
      - error
      type: object
      properties:
        error:
          $ref: '#/components/schemas/micr

# --- truncated at 32 KB (154 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/microsoft-graph/refs/heads/main/openapi/microsoft-graph-users-useractivity-api-openapi.yml