Orchestrator API PATCH /odata/user(id)

Hi

I am helping a company consolidate their license usage (on-prem Orchestrator).

A lot of inactive users have a StudioPro license assigned that should be removed.
I am trying to do this using Orchestrator HTTP Request activity and the endpoint:

PATCH /odata/Users({key})

Here is a section of how the JSON payload looks like as a reference for my questions below:

{
	"Name": "name",
    "UserName": "username",
    "LicenseType": "StudioPro",
    "MayHaveRobotSession": true,
    "MayHaveUnattendedSession": true,
    "RobotProvision": {
        "UserName": "domain\\username",
        "RobotId": 1234,
        "RobotType": "StudioPro",
        "ExecutionSettings": {
            "LoginToConsole": true,
            "ResolutionWidth": "1920",
            "ResolutionHeight": "1080"
        }
    },
}

Which key/value pairs must be filled out to withdraw a StudioPro license?
I have tried with:

{
    "LicenseType": null,
    "MayHaveRobotSession": false,
}

This results in the property Enable user to run automations being deselected in the GUI.
However it does not affect the total license usage being lowered.
And if I manually set the check and chose Automation Developer license, the username is still filled out.

I am now trying to clear out the section regarding RobotProvision, as it seems this is the last bit needed to withdraw the license, but I have not found an approach that works.

{
    "RobotProvision": null
}

Is accepted with statuscode 200 but does not clear out the section.

Regards
Soren

Hello @SorenB!

It seems that you have trouble getting an answer to your question in the first 24 hours.
Let us give you a few hints and helpful links.

First, make sure you browsed through our Forum FAQ Beginner’s Guide. It will teach you what should be included in your topic.

You can check out some of our resources directly, see below:

  1. Always search first. It is the best way to quickly find your answer. Check out the image icon for that.
    Clicking the options button will let you set more specific topic search filters, i.e. only the ones with a solution.

  2. Topic that contains most common solutions with example project files can be found here.

  3. Read our official documentation where you can find a lot of information and instructions about each of our products:

  4. Watch the videos on our official YouTube channel for more visual tutorials.

Hopefully this will let you easily find the solution/information you need. Once you have it, we would be happy if you could share your findings here and mark it as a solution. This will help other users find it in the future.

Thank you for helping us build our UiPath Community!

Cheers from your friendly
Forum_Staff