Cannot add user to Security Rule by API

Reply
L2 Linker

Cannot add user to Security Rule by API

There is a good example how to add user by API

http://api-lab.paloaltonetworks.com/groups.html#example-add-user-to-group-mappings-groups

 

If I put the XML from the example to https://192.168.1.100/php/rest/browse.php/user-id


<uid-message>
<version>2.0</version>
<type>update</type>
<payload>
<login>
<entry name="domain\user1" ip="192.168.1.50" />
</login>
<groups>
<entry name="group1">
<members>
<entry name="user1" />
<entry name="domain\user2" />
</members>
</entry>
<entry name="group2">
<members>
<entry name="user3" />
</members>
</entry>
</groups>
</payload>
</uid-message>

 

Then it works well:

<response status="success">
<result>
<uid-response>
<version>2.0</version>
<payload> </payload>
</uid-response>
</result>
</response>

 

admin@PA-220> show user ip-user-mapping all

 

IP                                            Vsys                From    User                             IdleTimeout(s) MaxTimeout(s)

--------------------------------------------- ------------------- ------- -------------------------------- -------------- -------------

192.168.1.50                                  vsys1               XMLAPI  domain\user1                     2696           2696         

Total: 1 users

 

But I cannot see this user "domain\user1" from security policy rule. Why? I see only group name.
Снимок экрана 2019-09-30 в 19.07.18.pngCannot get username to the list

L2 Linker

Re: Cannot add user to Security Rule by API

@dbatrankov 

 

I noticed similar behavior in the past. Try to type the username manually in the rule base and commit it. See if you can see logs for that security rule.

Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the Live Community as a whole!

The Live Community thanks you for your participation!