# GetAsset

> Gets a specified [Orchestrator asset](https://docs.uipath.com/orchestrator/docs/about-assets) by using a provided **AssetName**. If the asset is not global, it must be assigned to the local robot in order to be retrieved. The activity uses the same authentication context as the Robot under which it runs. For more information about global assets, you can access [About Assets](https://docs.uipath.com/orchestrator/docs/about-assets).

Gets a specified [Orchestrator asset](https://docs.uipath.com/orchestrator/docs/about-assets) by using a provided **AssetName**. If the asset is not global, it must be assigned to the local robot in order to be retrieved. The activity uses the same authentication context as the Robot under which it runs. For more information about global assets, you can access [About Assets](https://docs.uipath.com/orchestrator/docs/about-assets).

## Definition

**Namespace:** UiPath.Activities.System.API

**Assembly:** UiPath.System.Activities.Api (in UiPath.System.Activities.Api.dll)

## Overloads

|  |  |
| --- | --- |
| `GetAsset(String)` | Gets a specified asset by using a provided **AssetName**. If the asset is not global, it must be assigned to the local robot in order to be retrieved. |
| `GetAsset(String, String)` | Gets a specified asset by using a provided **AssetName**. If the asset is not global, it must be assigned to the local robot in order to be retrieved, at a specified folder path. |
| `GetAsset(String, String, CacheStrategyEnum, Int32)` | Gets a specified asset by using a provided **AssetName**. If the asset is not global, it must be assigned to the local robot in order to be retrieved, along with other configurations. |

## `GetAsset(String)`

Gets a specified asset by using a provided **AssetName**. If the asset is not global, it must be assigned to the local robot in order to be retrieved.

```
Object GetAsset(
    string assetName
)
```

`assetName` [String](https://learn.microsoft.com/dotnet/api/system.string) : The name of the asset to be retrieved.

## `GetAsset(String, String)`

Gets a specified asset by using a provided AssetName. If the asset is not global, it must be assigned to the local robot in order to be retrieved, at a specified folder path.

```
Object GetAsset(
    string assetName,
    string folderPath
)
```

`assetName` [String](https://learn.microsoft.com/dotnet/api/system.string) : The name of the asset to be retrieved.

`folderPath` [String](https://learn.microsoft.com/dotnet/api/system.string) : [The path of the folder](https://docs.uipath.com/orchestrator/docs/folders) where the asset is located and must be retrieved from, if different from the folder where the process is running.

## `GetAsset(String, String, CacheStrategyEnum, Int32)`

Gets a specified asset by using a provided AssetName. If the asset is not global, it must be assigned to the local robot in order to be retrieved, along with other configurations.

```
Object GetAsset(
    string assetName,
    string folderPath,
    CacheStrategyEnum cacheStrategy,
    int timeoutMS
)
```

`assetName` [String](https://learn.microsoft.com/dotnet/api/system.string) : The name of the asset to be retrieved.

`folderPath` [String](https://learn.microsoft.com/dotnet/api/system.string) : [The path of the folder](https://docs.uipath.com/orchestrator/docs/folders) where the asset is located and must be retrieved from, if different from the folder where the process is running.

`cacheStrategy CacheStrategyEnum` : The values retrieved will be cached for the selected period. By default, all the requests will be forwarded to Orchestrator.

`timeoutMS` [Int32](https://learn.microsoft.com/dotnet/api/system.int32) : Specifies the amount of time (in milliseconds) to wait for the activity to run before an error is thrown. The default value is 30000 milliseconds (30 seconds).

## Return value

[Object](https://learn.microsoft.com/dotnet/api/system.object)

The retrieved asset.
