Delete learningCourseActivity

Namespace: microsoft.graph

Delete a learningCourseActivity object using the course activity ID of either an assignment or a self-initiated activity.

Note: A provider can only manage Learning course activities when isCourseAcitvitySyncEnabled is set to true. To update the value, use the Update learningProvider method.

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) Not supported. Not supported.
Delegated (personal Microsoft account) Not supported. Not supported.
Application LearningAssignedCourse.ReadWrite.All LearningSelfInitiatedCourse.ReadWrite.All

HTTP request

DELETE /employeeExperience/learningProviders/{registrationId}/learningCourseActivities/{id}

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.

Request body

Don't supply a request body for this method.

Response

If successful, this method returns a 204 No Content response code.

If unsuccessful, this method returns one of the responses below:

Scenario HTTP code Code Message
Method not supported for entity 405 methodNotAllowed This method isn't supported for this entity type. See the Microsoft Graph documentation for the methods applicable to this entity.
User doesn't have the appropriate permissions scope 403 Forbidden Your account doesn't have access to this report or data. Contact your global administrator to request access.
Forbidden 403 Forbidden You don't have an adequate service plan for this request.
Bad request 400 badRequest This provider isn't enabled for the given tenant.
Bad request 400 badRequest There was an issue with your request. Make sure the registrationId you entered is valid or registered for your tenant.
Bad request 404 notFound The requested assignment ID doesn’t exist.
Internal server error 500 internalServerError Internal server error.
Request throttled 429 tooManyRequests {"code": "tooManyRequests","message": "Retry after {noOfMinutes} minutes"}.
Service unavailable 503 serviceUnavailable {"code": "serviceUnavailable","message": "Retry after {noOfMinutes} minutes"}.

Examples

Request

The following example shows a request.

DELETE https://graph.microsoft.com/v1.0/employeeExperience/learningProviders/13727311-e7bb-470d-8b20-6a23d9030d70/learningCourseActivities/be2f4d76-e020-11ec-9d64-0242ac120002

Response

The following example shows the response.

HTTP/1.1 204 No Content

Error conditions

Scenario HTTP code Code Message Details
Method not supported for entity 405 MethodNotAllowed This method isn't supported for this entity type. See the Microsoft Graph documentation for the methods applicable to this entity
User doesn't have the appropriate permissions scope 403 Forbidden Your account doesn't have access to this report or data. Contact your global administrator to request access.
Forbidden 403 Forbidden You don't have a service plan adequate for this request.
Bad request 400 Bad Request This provider isn't enabled for the given tenant.
Bad request 400 Bad Request There was an issue with your request. Make sure the registrationId you entered is valid or registered for your tenant
Bad request 404 Not Found The requested assignment {id} doesn’t exist.
Internal server error 500 Internal Server Error Internal Server Error
Request throttled 429 Too Many Requests {"code": "TooManyRequests","message": "Retry after {noOfMinutes} minutes"}
Service unavailable 503 Service Unavailable {"code": "ServiceUnavailable","message": "Retry after {noOfMinutes} minutes"}