# SAP Solution Manager command line

> The SAP Solution Manager command tool allows you to check the status of your integration with UiPath® Studio. You can find this tool packaged with each Studio build as `UiPath.SAP.SolutionManager.CommandLine.exe` in the default installation folder, as follows : `C:\Program Files\UiPath\Studio\net461`. Alternatively, you can find the executable in your custom installation folder.

The SAP Solution Manager command tool allows you to check the status of your integration with UiPath® Studio. You can find this tool packaged with each Studio build as `UiPath.SAP.SolutionManager.CommandLine.exe` in the default installation folder, as follows : `C:\Program Files\UiPath\Studio\net461`. Alternatively, you can find the executable in your custom installation folder.

## Command line arguments descriptions

Check the following table for descriptions of the available parameters and how you can use them.

| Command | Description |
| --- | --- |
| `-s`,`--status` | Show the registration status.  To understand error codes, check [Troubleshooting status error messages](https://docs.uipath.com/test-manager/standalone/2024.10/user-guide/sap-solution-manager-command-line#sap-solution-manager-command-line). |
| `-r`,`--register` | Register the communication interface. |
| `-u`,`--unregister` | Unregister the communication interface. |
| `-i`,`--ip` | Show the connection IP used in Studio. |
| `-o`,`--out` | Show the output files. |
| `--help` | Show help. |
| `--version` | Show version number. |

## Troubleshooting status error messages

The following list describes common SAP Solution Manager errors and how you can solve them:

* **UiPath Plugin not installed**: To solve this you need to [install the UiPath® Plugin](https://docs.uipath.com/test-manager/standalone/2024.10/user-guide/configuring-user-machine#configuring-user-machine).
* **SAP Connector unavailable**: To solve this you need to [install the SAP Connector](https://docs.uipath.com/test-manager/standalone/2024.10/user-guide/configuring-user-machine#configuring-user-machine).
  :::important
  SAP Connector runs only on x86 OS architecture.
  :::
* **UiPath Plugin uninstalled, SAP Connector installed**: To solve this you need to [install the UiPath® Plugin](https://docs.uipath.com/test-manager/standalone/2024.10/user-guide/configuring-user-machine#configuring-user-machine).
* **UiPath Plugin uninstalled, SAP Connector uninstalled**: To solve this you need to install both [UiPath® Plugin](https://docs.uipath.com/test-manager/standalone/2024.10/user-guide/configuring-user-machine#configuring-user-machine) and [SAP Connector](https://docs.uipath.com/test-manager/standalone/2024.10/user-guide/configuring-user-machine#configuring-user-machine)
  :::important
  SAP Connector runs only on x86 OS architecture.
  :::
* **UiPath Plugin installed, SAP Connector is x64 instead of x86 (plugin cannot work)**: To solve this you need to [install the SAP Connector](https://docs.uipath.com/test-manager/standalone/2024.10/user-guide/configuring-user-machine#configuring-user-machine).
  :::important
  SAP Connector runs only on x86 OS architecture.
  :::
* If execution from your SAP instance fails after a successful configuration, follow these steps to solve it:
  1. Verify that the SAP Solution Manager client has the required client scopes.
     1. Retrieve the client from the Clients table in the Identity service database and search for the client name - `SapSolaman.OpenId`.
     2. Check that the client has the following scopes assigned in the `ClientScopes` table of Identity service:
        + `TestManager`
        + `email`
        + `profile`
        + `openid`
        + `TM.TestExecutions`
        + `TM.TestCases.Read` Check the following examples for actions that you can perform with a client within your Identity service:
          1. Insert a new client:
             ```
             INSERT INTO yourDatabase.identity.clients (ClientID, ClientName, Scope)
             VALUES ('YourClientID', 'YourClientName', 'YourScope')
             ```
          2. Update an existing client:
             ```
             UPDATE yourDatabase.identity.clients
             SET ClientName = 'YourNewClientName',
                 Scope = 'TM.TestCases.Read'
             WHERE ClientID = 'YourClientID'
             ```
          3. Insert specific scopes to an existing client:
             ```
             INSERT INTO yourDatabase.identity.client.scopes
             VALUES ('TM.TestExecutions', 'YourClientID')
             INSERT INTO yourDatabase.identity.client.scopes
             VALUES ('TM.TestCases.Read', 'YourClientID')
             ```
  2. After you make any change to the client registration in the Identity service tables, you need to re-trigger the login for these changes to reflect:
     1. Delete the folder from this path: `Users/%Userprofile%/Sap/SAP_Waldorf`.
     2. Depending on the delivery option of your Test Manager instance, do one of the following:
        + For Standalone Test Manager: Restart the IIS server or recycle application pool of the Identity server.
        + For Test Manager in Automation Suite: Flush the Redis cache, or restart the Identity pod.
