# DurableTaskGrainExtensions.GetDurableTask(IAddressable, string)

[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#L207-L209)

```csharp
public static DurableTaskReference<TResult> GetDurableTask<TResult>(this IAddressable target, string rootId)
```

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

### Parameters

- `target` (`IAddressable`): The grain which owns the durable task, which can be the calling grain.
- `rootId` (`string`): The root ID of a task which a client, a grain, or a durable execution started.

### Returns

A reference which behaves as [DurableTaskGrainExtensions](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.tasks.durabletaskgrainextensions/) describes.

### Exceptions

- `System.ArgumentNullException`: `target` is `null`.
- `System.ArgumentException`: `rootId` is empty or whitespace.
