# DurableTaskContext.AttemptCancellationToken

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.durable.abstractions/orleans.durable.tasks.durabletaskcontext/) | [Properties](/orleans/docs/api/csharp/microsoft.orleans.durable.abstractions/orleans.durable.tasks.durabletaskcontext/properties/)

[Source](https://github.com/dotnet/orleans/blob/6a0e937f544c35ffcf11b37e4c2b7de5a1580a03/src/Orleans.Durable.Abstractions/DurableTaskContext.cs#L231)

```csharp
public CancellationToken AttemptCancellationToken
```

Gets the token which is canceled when the host cancels this attempt: its grain activation is stopping, or the task was aborted or deleted. Pass it to the calls which durable cleanup makes after task cancellation.
