Failed to create user through API.
Answered
Why are there 403 errors? The account permissions already the highest
-

This account has all permissions
The same error occurs with the admin account
0 -
Hello,
It seems to be a bug. Thank you for calling attention.
JIRA-VMS-37244
0 -
I am experiencing exactly the same issue. May I know when can it be fixed? Andrey Terentyev
0 -
Gentlemen, the bug has been just registered. No term for now.
0 -
Hello,
The bug is in the web interface application, not in the API function.
Here is a recommended way to test and use this API.
1. According to the documentation "isOwner" should be false when creating a new user.

2. Don't use server web interface for testing this API. Use a python script, for example this one
here is what I modified in the script for creating a new user
payload = {"name": "test1", "email": "", "type": "local", "isOwner": False, "isEnabled": True, "isHttpDigestEnabled": True, "password": "345sdfg1345awsdf"}
get_method_header = create_header(primary_token)
system_info = request_api(LOCAL_URL, f'/rest/v1/users', 'POST', verify=False,
headers=get_method_header, json=payload)3. Make sure your session (i.e. token) is not older than 10 min.
0
Please sign in to leave a comment.
Comments
5 comments