PrintTaskDefinition.ReadWrite.All
Allows the application to read and update print task definitions without a signed-in user.
Permission Details
Read, write and update print task definitions
Allows the application to read and update print task definitions without a signed-in user.
456b71a7-0ee0-4588-9842-c123fcc8f664
Properties
Properties is shown from stable Microsoft Graph v1.0 metadata.
| Property | Type | Description |
|---|---|---|
createdBy |
appIdentity |
The application that created the printTaskDefinition. Read-only. |
displayName |
String |
The name of the printTaskDefinition. |
id |
String |
The printTaskDefinition's identifier. Read-only. |
tasks |
printTask collection |
A list of tasks that have been created based on this definition. The list includes currently running tasks and recently completed tasks. Read-only. |
JSON Representation
JSON representation is shown from stable Microsoft Graph v1.0 metadata.
{
"@odata.type": "#microsoft.graph.printTaskDefinition",
"id": "String (identifier)",
"displayName": "String",
"createdBy": {
"@odata.type": "microsoft.graph.appIdentity"
}
}
Relationships
Relationships is shown from stable Microsoft Graph v1.0 metadata.
| Relationship | Type | Description |
|---|---|---|
tasks |
printTask collection |
A list of tasks that have been created based on this definition. The list includes currently running tasks and recently completed tasks. Read-only. |
createdBy |
appIdentity |
Related createdBy data exposed by this resource. |
Graph Methods
Microsoft Graph v1.0 endpoints are mapped directly from refreshed Microsoft Learn permissions tables.
Microsoft Graph beta endpoints are mapped directly from refreshed Microsoft Learn permissions tables.
Microsoft Graph PowerShell v1.0 commands are mapped directly from refreshed Microsoft Learn PowerShell snippets.
Microsoft Graph PowerShell beta commands are mapped directly from refreshed Microsoft Learn PowerShell snippets.
Code Examples
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new PrintTaskDefinition
{
DisplayName = "Test TaskDefinitionName",
CreatedBy = new AppIdentity
{
DisplayName = "Requesting App Display Name",
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Print.TaskDefinitions.PostAsync(requestBody);
const options = {
authProvider,
};
const client = Client.init(options);
const printTaskDefinition = {
displayName: 'Test TaskDefinitionName',
createdBy: {
displayName: 'Requesting App Display Name'
}
};
await client.api('/print/taskDefinitions')
.post(printTaskDefinition);
Import-Module Microsoft.Graph.Devices.CloudPrint
$params = @{
displayName = "Test TaskDefinitionName"
createdBy = @{
displayName = "Requesting App Display Name"
}
}
New-MgPrintTaskDefinition -BodyParameter $params
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.print_task_definition import PrintTaskDefinition
from msgraph.generated.models.app_identity import AppIdentity
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = PrintTaskDefinition(
display_name = "Test TaskDefinitionName",
created_by = AppIdentity(
display_name = "Requesting App Display Name",
),
)
result = await graph_client.print.task_definitions.post(request_body)
App Registration
Navigate to Azure Portal
Go to App registrations in Microsoft Entra admin center
Add API Permission
Select your app → API permissions → Add a permission → Microsoft Graph
Select Permission Type
Choose Application permissions and search for PrintTaskDefinition.ReadWrite.All
Grant Admin Consent
Application permissions always require admin consent.