Cannot add user to Security Rule by API

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Please sign in to see details of an important advisory in our Customer Advisories area.

Cannot add user to Security Rule by API

L2 Linker

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.
Cannot get username to the listCannot get username to the list

1 REPLY 1

L3 Networker

@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.

  • 2479 Views
  • 1 replies
  • 0 Likes
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 LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!