UsersAPI.edit() does not send payload, resulting in HTTP 415.
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 90/100
Research direction
Read tenable/io/users.py and inspect UsersAPI.edit(), where the issue identifies the payload construction and the PUT call that omits it. Check nearby tests for user editing and run the relevant test; done means the PUT receives the constructed payload and the edit operation no longer fails with HTTP 415.
Written by the indexing model from the issue text.
Description
Describe the bug
UsersAPI.edit() in pyTenable 26.10.1 builds the user update payload but does not pass the payload to the underlying PUT request.
As a result, attempting to edit a user in Tenable Vulnerability Management results in:
UnsupportedMediaTypeError: [415: PUT] https://cloud.tenable.com/users/<user_id>
body=b'{"error":"Unsupported Media Type"}'
The implementation is constructed immediately beforehand
return self._api.put(f'users/{scrub(user_id)}').json()
To Reproduce
Steps to reproduce the behavior:
- Initialize a TenableIO client:
from tenable.io import TenableIO
tio = TenableIO(
access_key="...",
secret_key="..."
)
- Attempt to update the name of an existing Tenable Vulnerability Management user:
user_id = 1234567
tio.users.edit(
user_id,
name="Firstname Lastname"
)
- The request fails with
UnsupportedMediaTypeError: [415: PUT] https://cloud.tenable.com/users/1234567
body=b'{"error":"Unsupported Media Type"}'
- Reviewing tenable/io/users.py shows that edit() constructs a payload:
user = self.details(self._check('user_id', user_id, int))
payload = dict_merge(
{
'permissions': user['permissions'],
'enabled': user['enabled'],
'email': user['email'],
'name': user.get('name', None),
},
payload,
)
but does not pass it to the PUT request:
return self._api.put(f'users/{scrub(user_id)}').json()
The same operation succeeds when the payload is explicitly supplied to the underlying API client:
user = tio.users.details(user_id)
payload = {
"permissions": user["permissions"],
"enabled": user["enabled"],
"email": user["email"],
"name": "Firstname Lastname",
}
resp = tio.users._api.put(
f"users/{user_id}",
json=payload
)
resp.json()
Expected behavior
UsersAPI.edit() should pass the constructed payload to the PUT request and successfully update the specified user fields.
For example, the final request appears that it should be:
return self._api.put(
f'users/{scrub(user_id)}',
json=payload
).json()
Screenshots
N/A. Full exception and reproduction code provided above.
System Information (please complete the following information):
- OS: Windows
- Architecture: 64-bit
- pyTenable Version: 26.10.1
- Product: Tenable Vulnerability Management
- Python Version: 3.14.6
- Memory: N/A
Additional context
pyTenable 26.10.1 is the installed version:
import tenable
print(tenable.__version__)
Output
26.10.1
The issue can be worked around by calling:
tio.users._api.put(
f"users/{user_id}",
json=payload
)
with the same payload constructed by UsersAPI.edit(). This succeeds, which indicates the issue is specifically that UsersAPI.edit() constructs payload but does not provide it to _api.put().
- Dominant language
- Python
- Stars
- 417
- Forks
- 190
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 7
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from tenable/pyTenable
-
Bug: exports.vulns() and exports.was() still send the vpr_v2_score filter, which the API removed on 2026-10-01Possibly taken @lanz claimed this 7 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
All issues in tenable/pyTenable
Similar issues
-
follow-up needs-triage S3: minor
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
manaflow-ai/cmux#36856 · 1 comment ·
Maintainers usually reply within 1 day
-
documentation good first issue help wanted
Difficulty 1/5 1-3 hours Newbie friendliness 90/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Shell framework build fails at "copy the shader libraries": the iOS shader libraries are now one file b-<chain>.imgPossibly taken @xiaofeng-han claimed this today. Openbuild ios
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day