List learningCourseActivities

Namespace: microsoft.graph

Get a list of the learningCourseActivity objects (assigned or self-initiated) for a user.

This API is available in the following national cloud deployments.

Global service US Government L4 US Government L5 (DOD) China operated by 21Vianet

Permissions

Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.

Permission type Least privileged permissions Higher privileged permissions
Delegated (work or school account) LearningAssignedCourse.Read.All LearningSelfInitiatedCourse.Read.All
Delegated (personal Microsoft account) Not supported. Not supported.
Application Not supported. Not supported.

HTTP request

To retrieve the course activity list for a signed-in user:

GET /me/employeeExperience/learningCourseActivities

To retrieve the course activity list for a user:

GET /users/{user-id}/employeeExperience/learningCourseActivities

Optional query parameters

This method supports the $skip, $top, $count, and $select OData query parameters. For general information, see OData query parameters.

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.
Prefer include-unknown-enum-members. Optional.

Request body

Don't supply a request body for this method.

Response

If successful, this method returns a 200 OK response code and a collection of learningCourseActivity objects in the response body.

Examples

Request

The following example shows how to retrieve all the course activities for a given user.

GET https://graph.microsoft.com/v1.0/users/7ba2228a-e020-11ec-9d64-0242ac120002/employeeExperience/learningCourseActivities

Note: The response object shown here might be shortened for readability.

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

{
  "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#me/employeeExperience/learningCourseActivities$entity",
  "@odata.nextLink": "https://graph.microsoft.com/v1.0/$metadata#me/employeeExperience/learningCourseActivities?$skip=10",
  "value": [
    {
      "@odata.type": "#microsoft.graph.learningAssignment",
      "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#learningProviders('13727311-e7bb-470d-8b20-6a23d9030d70')/learningCourseActivities('8ba2228a-e020-11ec-9d64-0242ac120003')$entity",
      "assignedDateTime": "2021-05-11T22:57:17+00:00",
      "assignmentType": "required",
      "assignerUserId": "cea1684d-57dc-438d-a9d1-e666ec1a7f3d",
      "completedDateTime": null,
      "completionPercentage": null,
      "externalCourseActivityId": "12a2228a-e020-11ec-9d64-0242ac120002",
      "id": "8ba2228a-e020-11ec-9d64-0242ac120003",
      "dueDateTime": {
        "dateTime": "2022-09-22T16:05:00.0000000",
        "timeZone": "UTC"
      },
      "learningContentId": "57baf9dc-e020-11ec-9d64-0242ac120002",
      "learningProviderId": "13727311-e7bb-470d-8b20-6a23d9030d70",
      "learnerUserId": "7ba2228a-e020-11ec-9d64-0242ac120002",
      "notes": {
        "contentType": "text",
        "content": "required assignment added for user"
      },
      "status": "notStarted"
    },
    {
      "@odata.type": "#microsoft.graph.learningAssignment",
      "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#learningProviders('13727311-e7bb-470d-8b20-6a23d9030d70')/learningCourseActivities('8ba2228a-e020-11ec-9d64-0242ac120003')$entity",
      "assignedDateTime": "2021-05-11T22:57:17+00:00",
      "assignmentType": "unknownFutureValue",
      "assignerUserId": "cea1684d-57dc-438d-a9d1-e666ec1a7f3d",
      "completedDateTime": null,
      "completionPercentage": null,
      "externalCourseActivityId": null,
      "id": "8ba2228a-e020-11ec-9d64-0242ac120003",
      "dueDateTime": {
        "dateTime": "2022-09-22T16:05:00.0000000",
        "timeZone": "UTC"
      },
      "learningContentId": "57baf9dc-e020-11ec-9d64-0242ac120002",
      "learningProviderId": "13727311-e7bb-470d-8b20-6a23d9030d70",
      "learnerUserId": "7ba2228a-e020-11ec-9d64-0242ac120002",
      "notes": {
        "contentType": "text",
        "content": "required assignment added for user"
      },
      "status": "notStarted"
    },
    {
      "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#learningProviders('13727311-e7bb-470d-8b20-6a23d9030d70')/learningCourseActivities('be2f4d76-e020-11ec-9d64-0242ac120002')$entity",
      "@odata.type": "#microsoft.graph.learningSelfInitiatedCourse",
      "completedDateTime": null,
      "completionPercentage": 20,
      "externalCourseActivityId": "12a2228a-e020-11ec-9d64-0242ac120002",
      "id": "be2f4d76-e020-11ec-9d64-0242ac120002",
      "learningContentId": "57baf9dc-e020-11ec-9d64-0242ac120002",
      "learningProviderId": "13727311-e7bb-470d-8b20-6a23d9030d70",
      "learnerUserId": "7ba2228a-e020-11ec-9d64-0242ac120002",
      "startedDateTime": "2021-05-21T22:57:17+00:00",
      "status": "inProgress"
    }
  ]
}

Request

The following example shows how to retrieve all the course activities for a given user when Prefer: include-unknown-enum-members is provided in the request header.

Response

Note: The response object shown here might be shortened for readability.

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

{
  "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#me/employeeExperience/learningCourseActivities$entity",
  "@odata.nextLink": "https://graph.microsoft.com/v1.0/$metadata#me/employeeExperience/learningCourseActivities?$skip=10",
  "value": [
    {
      "@odata.type": "#microsoft.graph.learningAssignment",
      "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#learningProviders('13727311-e7bb-470d-8b20-6a23d9030d70')/learningCourseActivities('8ba2228a-e020-11ec-9d64-0242ac120003')$entity",
      "assignedDateTime": "2021-05-11T22:57:17+00:00",
      "assignmentType": "required",
      "assignerUserId": "cea1684d-57dc-438d-a9d1-e666ec1a7f3d",
      "completedDateTime": null,
      "completionPercentage": null,
      "externalCourseActivityId": "12a2228a-e020-11ec-9d64-0242ac120002",
      "id": "8ba2228a-e020-11ec-9d64-0242ac120003",
      "dueDateTime": {
        "dateTime": "2022-09-22T16:05:00.0000000",
        "timeZone": "UTC"
      },
      "learningContentId": "57baf9dc-e020-11ec-9d64-0242ac120002",
      "learningProviderId": "13727311-e7bb-470d-8b20-6a23d9030d70",
      "learnerUserId": "7ba2228a-e020-11ec-9d64-0242ac120002",
      "notes": {
        "contentType": "text",
        "content": "required assignment added for user"
      },
      "status": "notStarted"
    },
    {
      "@odata.type": "#microsoft.graph.learningAssignment",
      "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#learningProviders('13727311-e7bb-470d-8b20-6a23d9030d70')/learningCourseActivities('8ba2228a-e020-11ec-9d64-0242ac120003')$entity",
      "assignedDateTime": "2021-05-11T22:57:17+00:00",
      "assignmentType": "peerRecommended",
      "assignerUserId": "cea1684d-57dc-438d-a9d1-e666ec1a7f3d",
      "completedDateTime": null,
      "completionPercentage": null,
      "externalCourseActivityId": null,
      "id": "8ba2228a-e020-11ec-9d64-0242ac120003",
      "dueDateTime": {
        "dateTime": "2022-09-22T16:05:00.0000000",
        "timeZone": "UTC"
      },
      "learningContentId": "57baf9dc-e020-11ec-9d64-0242ac120002",
      "learningProviderId": "13727311-e7bb-470d-8b20-6a23d9030d70",
      "learnerUserId": "7ba2228a-e020-11ec-9d64-0242ac120002",
      "notes": {
        "contentType": "text",
        "content": "required assignment added for user"
      },
      "status": "notStarted"
    },
    {
      "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#learningProviders('13727311-e7bb-470d-8b20-6a23d9030d70')/learningCourseActivities('be2f4d76-e020-11ec-9d64-0242ac120002')$entity",
      "@odata.type": "#microsoft.graph.learningSelfInitiatedCourse",
      "completedDateTime": null,
      "completionPercentage": 20,
      "externalCourseActivityId": "12a2228a-e020-11ec-9d64-0242ac120002",
      "id": "be2f4d76-e020-11ec-9d64-0242ac120002",
      "learningContentId": "57baf9dc-e020-11ec-9d64-0242ac120002",
      "learningProviderId": "13727311-e7bb-470d-8b20-6a23d9030d70",
      "learnerUserId": "7ba2228a-e020-11ec-9d64-0242ac120002",
      "startedDateTime": "2021-05-21T22:57:17+00:00",
      "status": "inProgress"
    }
  ]
}