# IDurableTaskManager.AbortAsync(TaskId, string, CancellationToken)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.tasks.idurabletaskmanager/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.tasks.idurabletaskmanager/methods/)

[Source](https://github.com/dotnet/orleans/blob/6a0e937f544c35ffcf11b37e4c2b7de5a1580a03/src/Orleans.Durable/DurableTasks/IDurableTaskManager.cs#L116)

```csharp
public abstract ValueTask AbortAsync(TaskId taskId, string reason, CancellationToken cancellationToken = default(CancellationToken))
```

Administratively aborts a task of this grain: commits the task and its execution tree as failed with [DurableTaskAbortedException](/orleans/docs/api/csharp/microsoft.orleans.durable.abstractions/orleans.durable.tasks.durabletaskabortedexception/) in one write, and stops their running attempts without running further task code.

### Parameters

- `taskId` (`TaskId`): The task identifier.
- `reason` (`string`): The reason for the abort, recorded as the exception message.
- `cancellationToken` (`CancellationToken`): A token which abandons waiting for the abort to commit.

### Returns

An operation which completes once the abort has committed.
