# SuccessFactors Scope

> `UiPath.SuccessFactors.Activities.SuccessFactorsScopeActivity`

`UiPath.SuccessFactors.Activities.SuccessFactorsScopeActivity`

The SAP SuccessFactors activities use a **Client ID** and **Client Secret** to establish an OAuth connection between UiPath and your SAP SuccessFactors application. This connection authorizes a Robot to call the SAP SuccessFactors APIs and access resources on your behalf.

You may also authenticate by:

* using an **Existing Connection** that has been established by a previous **SAP SuccessFactors Scope** activity
* using **Basic Authentication**, by setting the **Username** and **Password** properties.

After establishing a connection, a parent **SAP SuccessFactors Scope** activity can output a record of the connection in a `Connection` object 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/successfactors-setup) steps.
2. Add the **SAP SuccessFactors Scope** activity to your project.
3. Choose the **Auth Type** you want to use.
4. Enter values for one of the **Auth Type** properties.
5. Optionally, create and enter a `Connection` variable for the [Output](https://docs.uipath.com/activities/other/latest/legacy-integrations/successfactors-scope#successfactors-scope) property. You can use this variable in subsequent uses of the **SAP SuccessFactors Scope** activity.

### OAuth2 Client Credentials Authentication

1. Install the latest **SAP Success Factors Activities** package in Studio.
2. Add the **SuccessFactors Scope** activity to your process.
3. Click **Configure** to create your connection:

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/legacy-integrations-docs-image-179692-a348f283-8963a8d2.webp)
4. Under **Auth Type**, select **OAuth2 Client Credentials**.
5. You are now redirected to an external SAF SuccessFactors Configuration window. Here, you must configure access to your SAP SuccessFactors instance, as described in [SAP Help Portal](https://help.sap.com/viewer/f0a201cdb56d44e9823a3db3539a5d4f/Cloud/en-US/c6174a84455243df86edff3f3f99aad5.html#loiod778f11fcbd348f681fd7a472aafe17f).
6. Save the generated X.509 certificate, open it in any text editor application and extract the first part, found under `“-----BEGIN ENCRYPTED PRIVATE KEY-----”`:

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/legacy-integrations-docs-image-178203-c14012fd-5fd02cc6.webp)
7. Go back to your Studio process and paste the copied string in the **x.509 Certificate** field of the **SuccessFactor Scope Connection Configuration** window.
8. Fill in the rest of the fields with your data.
9. Click **Test Connection**. If you are connecting for the first time, it may take a few seconds for the connection to be created.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/legacy-integrations-docs-image-179104-832f95fe-9921a565.webp)

## 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** window allows you to specify both a **Design Connection** and a **Robot Connection**.

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

* **ExistingConnection** - A connection from the parent Application Scope to use instead of a new connection. Enter a `Connection` variable.
* **Base URL** - The API endpoint to connect to. Enter a string or `String` variable. The base URL is a value such as "https://sandbox.api.sap.com/".
* **Username** - The username. Enter a string or `String` variable.
* **Password** - The password to use. Enter a secure string or `SecureString` variable.

## 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.
* **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.
