Editing a user for unattended robot

I am trying to edit user for unattended robot in on-premise uipath orchstrator using below python script:
orchestrator_public_url = “https://my-desktop
url = orchestrator_public_url + “/odata/Users”

payload={}
headers = {
‘Content-Type’: ‘application/json’,
“Authorization”: auth
}

response = requests.request(“GET”, url, headers=headers, data=payload, verify=False)
response1 = json.loads(response.content)
key = response1[‘value’][0][‘Id’]

user_url = orchestrator_public_url + “odata/Users(”+ str(key)+“)”

user_payload = json.dumps({
“UserName”: “admin”,
“Name”: “admin”,
“UnattendedRobotDto”: {
“UserName”: “xxxxxxxx”,
“Password”: “xxxxxx”
}
})

user_headers = {
‘Content-Type’: ‘application/json’,
“Authorization”: auth
}

r = requests.request(“PUT”, user_url, headers=asset_headers, data=asset_payload, verify=False)

In response, I got the <Response[404]>

Kindly support on the same.

Thanks in advance.

Is the key value accurate?
Because it seems to be complaining 404 not found because when you add the key to the “/odata/Users”+key, it cannot find that qualified url.

Thanks for your response,
I see the output of the the user_url parameter. It is correct. And I got the same response. 404

Could this be the issue?

Should it be appended this way?

**/**odata