Skip to content

Latest commit

 

History

History
110 lines (83 loc) · 3.74 KB

File metadata and controls

110 lines (83 loc) · 3.74 KB
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

printJob: cancel

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]

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.

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]

HTTP request

POST /print/printers/{id}/jobs/{id}/cancel

Request headers

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

Request body

Do not supply a request body with this method.

Response

If successful, this method returns a 204 No Content response code. It doesn't return anything in the response body.

Example

The following example shows how to call this API.

Request

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]


Response

The following example shows the response.

HTTP/1.1 204 No Content