# DurableTaskGrainExtensions.GetDurableTask(IAddressable, TaskId)

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

[Source](https://github.com/dotnet/orleans/blob/6a0e937f544c35ffcf11b37e4c2b7de5a1580a03/src/Orleans.Durable/DurableTasks/DurableTaskGrainExtensions.cs#L255-L261)

```csharp
public static DurableTaskReference<TResult> GetDurableTask<TResult>(this IAddressable target, TaskId taskId)
```

Gets a reference to the existing durable task `taskId` on `target`, without scheduling it.

### Parameters

- `target` (`IAddressable`): The grain which owns the durable task, which can be the calling grain.
- `taskId` (`TaskId`): The identifier of a task which a client, a grain, or a durable execution started.

### Returns

A reference which a durable execution awaits, schedules, or passes to combinators to subscribe to the task's result, and which other code awaits, polls, cancels, or aborts.

### Exceptions

- `System.ArgumentNullException`: `target` is `null`.
- `System.ArgumentException`: `taskId` is empty.
