# Marketo Scope

> Establish an authenticated connection between UiPath and Marketo for use in automation workflows

`UiPath.Marketo.Activities.MarketoScopeActivity`

The Marketo activities use an (**Client ID***) and (**Client Secret**) as well as an (**Identity URL**) to establish an OAuth connection between UiPath and your Marketo application. This connection authorizes a Robot to call the Marketo APIs and access resources on your behalf.

After establishing a connection, a parent **Marketo Scope** activity can output a record of the connection in a `Connection` object (**Connection**) that you can use in subsequent child scope activities.

## How it works

The following steps are an example of how the activity works from design time (i.e., the activity dependencies and input/output properties) to run time.

1. Complete the [Setup](https://docs.uipath.com/activities/other/latest/legacy-integrations/marketo-setup) steps.
2. Add the **Marketo Scope** activity to your project.
3. Enter values for the **Input** properties.
4. Create and enter a `Connection` variable for [Output](https://docs.uipath.com/activities/other/latest/legacy-integrations/marketo-scope#marketo-scope) property. You can use this variable in subsequent uses of the **Marketo Scope** activity.

## In the Body of the Activity

To build your project and enable the **Object Wizard** in other activities, you must use the **Connection Wizard** by clicking the **Configure** button. The **Configure Connection** dialog allows you to specify both a **Design Connection** and a **Robot Connection**.

The **Design Connection** is used for authentication only for design-time experiences, such as viewing the list of `Leads` in the activity. The **Robot Connection** credentials will be used when the robot runs any activity.

Property values in the (**Design Connection**) section do not need to be quoted.

* **Client ID** - The Client ID to use for authentication. This field supports only `Strings` or `String` variables.
* **Client Secret** - The client secret for authentication. This field supports only `SecureStrings` or `SecureString` variables.
* **Base Url** - The base URL for the connection. This field supports only `Strings` or `String` variables.
* **Existing Connection** - Use an existing Marketo connection. Enter a `Connection` variable. The `Connection` variable must be from a previously run **Marketo Scope** activity (parent) that still has an active connection.

## Properties

### Common

* **DisplayName** - The display name of the activity. This field supports only `Strings` or `String` variables.

### Misc

* **Private** - If selected, the values of variables and arguments are no longer logged at Verbose level.

### Options

* **ReportApiErrorAsException** - When selected, API error responses are reported in BusinessActivityExecutionException by all child activities that use this application scope. When cleared, the child activity populates the API error message in the ResponseStatus output property and workflow execution continues. Check the ResponseStatus property to confirm successful execution.

### Output

* **Connection** - The connection which can be passed to a child application scope. Enter a `Connection` variable.
