With a single Unattended license, how to use different set of user and machine using this same Unattended license?
At times, there might be a requirement to run the different Robot processes (as part of different projects) using different service account users as the user will not want to run all the Bot processes using same account (using the single unattended license).
This may be due to their process requirements or to logically keep each of the projects separate within the same Tenant. The purpose of this KB is to explain the steps needed to accomplish this using the Orchestrator APIs. At the time of writing this, the current documentation does not give the updated instructions, hence this details the steps to be followed to accomplish the same using the Orchestrator’s APIs.
- Get the access token for the API’s.
- The first step is to get the access token in order to call the Cloud Orchestrator APIs. The steps for it are already documented at Consuming Cloud API
- Define the machine template (e.g. “Prod Machine Template” as given below) in the Cloud Orchestrator and copy the generated machine key for it as given below.
- Go to the cloud Orchestrator. Admin -> Users and Groups. Create two UiPath users (that will be used to configure the service account users for logging into the VM.)
- Assign the Automation user role to the newly created user.
- Assign the Unattended license ( by clicking on Edit User-> Robot setup) and enter the Windows user credentials for this user. As we need to use two different users, do this for both the users that have been created. i.e., enter the different domain / username.
- Open the individual VM’s can connect the UiPath orchestrator using the machine key that you noted in step 2. Please note that both the VM’s will get connected but one of the VM will show as unlicensed (as we have just one Unattended license)
- Open the Cloud Orchestrator Tenant page, and click on See More for the Unattended license
- There will be two entries for the two VM’s that have been connected. Press F12 (on Chrome) to open the developer console.
- Now, hit the Active connection (to toggle the license) and observe the logs. Look for the following entry.
The cloud.uipath.com URL should be visible as part of the logs. Please note this URL. There should also be an entry as follows in the same line.
In the Header Section :
Just add Authorization: Bearer + "Token get from first Request"
X-UIPATH-TenantName "Your tenant name"
In the Body section :
"key": "UseraA()", ----------------------- UserA = XX("username")@YY("Machine Template name")@ZZ(Hostname)
- Now, hit the URL that you got in Step 9 in Postman along with the following payload
https://cloud.uipath.com/XX/XYTenant/orchestrator_/odata/LicensesRuntime('Prod Machine Template')/UiPath.Server.Configuration.OData.ToggleEnabled
- Replace the URL with your cloud Orchestrator URL
"key": "<Key obtained from Step 9",
The enabled value will be true or false depending on whether you want to enable or disable the license on that VM.
Check the license status on the Cloud Orchestrator. It should get toggled depending on the API hit.
Read more on the Unattended Non Production Licensing .