Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Maik1
Contributor

Requested Object not found

{{ "name": "vpn-efef",

"email": "test@checkpoint.com",

"expiration-date": "2022-01-05",

"phone-number": "123456",

"authentication-method": "check point password",

"comments": "Herr Test Test",

"groups": "[ { 'name' : 'Administratoren_VPN'} ]",

"password": "******",

"color": "sea green" }}

I am trying to create users via web api and assign a group to them. However, I get an error
"code": "generic_err_object_not_found",
"message": "Requested object [[ { 'name' : 'Administrators_VPN'} ]] not found".

The Group exists!
Does anyone see the mistake?

0 Kudos
2 Replies
Stuart_Green1
Employee
Employee

are you able to share an example request with the code you're using? The first thing I can see is that the error message is referring to a group name that isn't in the request ("Administrators_VPN against Administratoren_VPN").

0 Kudos
Jonas_Rosenboom
Employee
Employee

The sample you posted has quotes around the square brackets, which then contain what looks like a JSON object.

This results in a string containing [ { 'name' : 'Administratoren_VPN'} ]

You probably want either of

"groups": ["Administratoren_VPN"],

"groups": "Administratoren_VPN",

 instead.

From the documentation of add-user (https://sc1.checkpoint.com/documents/latest/APIs/index.html?#web/add-user)20210324_140636-chrome-291.png

The expected input for "groups" is either a string "Group1", or a list of strings ["Group1","Group2"].

0 Kudos