printJob: cancel

Namespace: microsoft.graph

Cancel a print job. Print jobs can be canceled only on behalf of a user, using delegated permissions.

Permissions

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

In addition to the following permissions, the user or app's tenant must have an active Universal Print subscription.

Permission type Permissions (from least to most privileged)
Delegated (work or school account) PrintJob.ReadWriteBasic, PrintJob.ReadWrite, PrintJob.ReadWriteBasic.All, PrintJob.ReadWrite.All
Delegated (personal Microsoft account) Not supported.
Application Not supported. 

For an app with delegated permissions to cancel other users' jobs, the signed-in user must be a member of one of the following administrator roles:

  • Global Administrator
  • Printer Administrator

HTTP request

POST /print/printers/{printerId}/jobs/{printJobId}/cancel

Request headers

Name Description
Authorization Bearer {token}. Required.

Request body

Do not supply a request body with this method.

Response

If successful, this method returns a 204 No Content response code. It does not return anything in the response body.

Examples

Request

The following is an example of a request.

POST https://graph.microsoft.com/v1.0/print/printers/{printerId}/jobs/{printJobId}/cancel

Response

The following is an example of the response.

HTTP/1.1 204 No Content