| title | printJob: cancel |
|---|---|
| description | Cancel a print job. |
| author | braedenp-msft |
| ms.localizationpriority | medium |
| ms.subservice | universal-print |
| doc_type | apiPageType |
| ms.date | 09/24/2024 |
Namespace: microsoft.graph
[!INCLUDE beta-disclaimer]
Cancel a print job. Print jobs can be canceled only on behalf of a user, using delegated permissions.
[!INCLUDE national-cloud-support]
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.
Note: For an app with delegated permissions to cancel other users' jobs, the signed-in user must be a member of the Printer Administrator role.
[!INCLUDE permissions-table]
POST /print/printers/{id}/jobs/{id}/cancel| Name | Description |
|---|---|
| Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
Do not supply a request body with this method.
If successful, this method returns a 204 No Content response code. It doesn't return anything in the response body.
The following example shows how to call this API.
The following example shows a request.
POST https://graph.microsoft.com/beta/print/printers/{id}/jobs/{id}/cancel[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
The following example shows the response.
HTTP/1.1 204 No Content