# IDurableTaskManager.GetTask(TaskId)

[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)

```csharp
public abstract ScheduledTask<TResult> GetTask<TResult>(TaskId taskId)
```

Gets a typed handle which observes or cancels an existing task of this grain.

### Parameters

- `taskId` (`TaskId`): The task identifier.

### Returns

A handle for the task. Polling or waiting for a task which this grain doesn't retain throws [DurableTaskNotFoundException](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.tasks.durabletasknotfoundexception/).
