Delete printTaskTrigger
Article
03/02/2023
5 contributors
Feedback
In this article
Namespace: microsoft.graph
Delete the task trigger of a printer to prevent related print events from triggering tasks on the specified printer.
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's tenant must have an active Universal Print subscription.
Permission type
Permissions (from least to most privileged)
Delegated (work or school account)
Printer.ReadWrite.All, Printer.FullControl.All
Delegated (personal Microsoft account)
Not Supported.
Application
Not Supported.
HTTP request
DELETE /print/printers/{printerId}/taskTriggers/{printTaskTriggerId}
Name
Description
Authorization
Bearer {token}. Required.
Request body
Do not supply a request body for this method.
Response
If successful, this method returns a 204 No Content
response code.
Examples
Request
DELETE https://graph.microsoft.com/v1.0/print/printers/{printerId}/taskTriggers/{printTaskTriggerId}
// Code snippets are only available for the latest version. Current version is 5.x
var graphClient = new GraphServiceClient(requestAdapter);
await graphClient.Print.Printers["{printer-id}"].TaskTriggers["{printTaskTrigger-id}"].DeleteAsync();
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
//other-imports
)
graphClient := msgraphsdk.NewGraphServiceClientWithCredentials(cred, scopes)
graphClient.Print().Printers().ByPrinterId("printer-id").TaskTriggers().ByTaskTriggerId("printTaskTrigger-id").Delete(context.Background(), nil)
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
graphClient.print().printers("{printerId}").taskTriggers("{printTaskTriggerId}")
.buildRequest()
.delete();
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
const options = {
authProvider,
};
const client = Client.init(options);
await client.api('/print/printers/{printerId}/taskTriggers/{printTaskTriggerId}')
.delete();
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
<?php
// THIS SNIPPET IS A PREVIEW FOR THE KIOTA BASED SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($requestAdapter);
$graphServiceClient->print()->printers()->byPrinterId('printer-id')->taskTriggers()->byTaskTriggerId('printTaskTrigger-id')->delete();
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
Import-Module Microsoft.Graph.Devices.CloudPrint
Remove-MgPrintPrinterTaskTrigger -PrinterId $printerId -PrintTaskTriggerId $printTaskTriggerId
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
Response
HTTP/1.1 204 No Content