<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: mgmt_cli command needed to list all AD-Groups used in all Access Roles in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli-command-needed-to-list-all-AD-Groups-used-in-all-Access/m-p/77538#M4546</link>
    <description>Remember to use "mgmt" from clish or "mgmt_cli" from expert, you need to login to create a session.&lt;BR /&gt;It's in this command where you specify which domain you want to query, not the subsequent show access-roles.&lt;BR /&gt;The session ID will determine what CMA is being queried.&lt;BR /&gt;Not sure what happens on MDS if you use clish to log in and you don't specify the domain, but I'm guessing it's the global domain, which obviously won't have these access roles defined.</description>
    <pubDate>Sat, 07 Mar 2020 07:18:18 GMT</pubDate>
    <dc:creator>PhoneBoy</dc:creator>
    <dc:date>2020-03-07T07:18:18Z</dc:date>
    <item>
      <title>mgmt_cli command needed to list all AD-Groups used in all Access Roles</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli-command-needed-to-list-all-AD-Groups-used-in-all-Access/m-p/77468#M4540</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;while I am still fighting to list the content of a specific Access Role (AR) within &lt;A title="Showing existing Access Role results in error" href="https://community.checkpoint.com/t5/API-CLI-Discussion-and-Samples/Showing-existing-Access-Role-results-in-error/m-p/76439/highlight/true#M4447" target="_blank" rel="noopener"&gt;an other post of mine&lt;/A&gt; using this:&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3" color="#0000FF"&gt;&lt;U&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;To get the doamin ID in an MDM environment:&lt;/FONT&gt;&lt;/U&gt;&lt;BR /&gt;psql_client cpm postgres -c"select objid,name from domainbase_data where dlesession=0 and not deleted;"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;&lt;U&gt;To log in an create a session:&lt;BR /&gt;&lt;/U&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier" size="3" color="#0000FF"&gt;mgmt_cli login user "&amp;lt;myRADIUSuser&amp;gt;" password "&amp;lt;myRADIUSpin+CURRENTtokenCODE&amp;gt;" &amp;gt; sid.txt.$$&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT face="courier new,courier" size="3" color="#0000FF"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="3" color="#0000FF"&gt;&lt;SPAN&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#000000"&gt;&lt;U&gt;To resuse the session and &lt;STRONG&gt;execute commands&lt;/STRONG&gt; related to a specific domain (ID from above):&lt;/U&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;BR /&gt;mgmt_cli -s sid.txt.$$ -d &amp;lt;domain_ID&amp;gt; show access-role name "&amp;lt;Access_Role_name&amp;gt;"&amp;nbsp;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;...I also need to &lt;STRONG&gt;list alle AD-Groups used in any AR&lt;/STRONG&gt; in general (not the ARs them self).&lt;/P&gt;&lt;P&gt;Does someone have an idea and could give me a hint? There was a command in R77.30 to do exactly that: list alle AD-Groups used. Unfortunately I have to do it again but now in R80.30. Listing all ARs would not help as such.&lt;/P&gt;&lt;P&gt;I'm not a pro in scripting. A oneliner that could be used with mgmt_cli would be great.&lt;BR /&gt;I am just about able to utilize a filter as well" | $CPDIR/jq/jq '&amp;lt;filter_terms&amp;gt;' "&lt;/P&gt;&lt;P&gt;For some reason, when trying to list at least the ARs I get this:&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3" color="#FF0000"&gt;mgmt_cli -s sid.txt.$$ -d &amp;lt;domain_ID&amp;gt; show access-roles&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;objects: []&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;total: 0&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I do need this to replace Active Directory Groups with new ones as we are migrating into another Active Domain. The result of the above query would feed into a Firewall Change Request to replace each Group with the new one accordingly. This way we won't miss anything.&lt;/P&gt;&lt;P&gt;I'm lost&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":face_with_rolling_eyes:"&gt;🙄&lt;/span&gt;&lt;BR /&gt;Thanks in advance for your thoughts&lt;/P&gt;&lt;P&gt;regards&lt;BR /&gt;Carsten&lt;/P&gt;</description>
      <pubDate>Sat, 07 Mar 2020 15:41:00 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli-command-needed-to-list-all-AD-Groups-used-in-all-Access/m-p/77468#M4540</guid>
      <dc:creator>Carsten_Weber</dc:creator>
      <dc:date>2020-03-07T15:41:00Z</dc:date>
    </item>
    <item>
      <title>Re: mgmt_cli command needed to list all AD-Groups used in all Access Roles</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli-command-needed-to-list-all-AD-Groups-used-in-all-Access/m-p/77538#M4546</link>
      <description>Remember to use "mgmt" from clish or "mgmt_cli" from expert, you need to login to create a session.&lt;BR /&gt;It's in this command where you specify which domain you want to query, not the subsequent show access-roles.&lt;BR /&gt;The session ID will determine what CMA is being queried.&lt;BR /&gt;Not sure what happens on MDS if you use clish to log in and you don't specify the domain, but I'm guessing it's the global domain, which obviously won't have these access roles defined.</description>
      <pubDate>Sat, 07 Mar 2020 07:18:18 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli-command-needed-to-list-all-AD-Groups-used-in-all-Access/m-p/77538#M4546</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2020-03-07T07:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: mgmt_cli command needed to list all AD-Groups used in all Access Roles</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli-command-needed-to-list-all-AD-Groups-used-in-all-Access/m-p/77546#M4547</link>
      <description>When you want to use a oneliner from expert you can update your command like this:&lt;BR /&gt;mgmt_cli -r true -d &amp;lt;domain_ID&amp;gt; show access-role name "&amp;lt;Access_Role_name&amp;gt;" &lt;BR /&gt;-r true uses the root privs and will only execute this command and logout again.</description>
      <pubDate>Sat, 07 Mar 2020 08:01:19 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli-command-needed-to-list-all-AD-Groups-used-in-all-Access/m-p/77546#M4547</guid>
      <dc:creator>Maarten_Sjouw</dc:creator>
      <dc:date>2020-03-07T08:01:19Z</dc:date>
    </item>
    <item>
      <title>Re: mgmt_cli command needed to list all AD-Groups used in all Access Roles</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli-command-needed-to-list-all-AD-Groups-used-in-all-Access/m-p/77553#M4548</link>
      <description>&lt;P&gt;Thanks, I am aware of the login through your responses to the ohter post.&lt;/P&gt;&lt;P&gt;To make this more clear I did added it to my post above just now.&lt;/P&gt;</description>
      <pubDate>Sat, 07 Mar 2020 13:17:47 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli-command-needed-to-list-all-AD-Groups-used-in-all-Access/m-p/77553#M4548</guid>
      <dc:creator>Carsten_Weber</dc:creator>
      <dc:date>2020-03-07T13:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: mgmt_cli command needed to list all AD-Groups used in all Access Roles</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli-command-needed-to-list-all-AD-Groups-used-in-all-Access/m-p/77556#M4549</link>
      <description>But again you are making the same mistake, you cannot use a -d &amp;lt;domain&amp;gt; on a normal command line, this can only be used on the login line:&lt;BR /&gt;mgmt_cli login user "&amp;lt;myRADIUSuser&amp;gt;" password "&amp;lt;myRADIUSpin+CURRENTtokenCODE&amp;gt; -d &amp;lt;domain&amp;gt; &amp;gt; sid.txt&lt;BR /&gt;mgmt_cli -s sid.txt  show access-role name "&amp;lt;Access_Role_name&amp;gt;" &lt;BR /&gt;mgmt_cli logout -s sid.txt&lt;BR /&gt;&lt;BR /&gt;You achieve the same by using:&lt;BR /&gt;mgmt_cli -r true -d &amp;lt;domain&amp;gt;  show access-role name "&amp;lt;Access_Role_name&amp;gt;"</description>
      <pubDate>Sat, 07 Mar 2020 15:36:55 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli-command-needed-to-list-all-AD-Groups-used-in-all-Access/m-p/77556#M4549</guid>
      <dc:creator>Maarten_Sjouw</dc:creator>
      <dc:date>2020-03-07T15:36:55Z</dc:date>
    </item>
    <item>
      <title>Re: mgmt_cli command needed to list all AD-Groups used in all Access Roles</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli-command-needed-to-list-all-AD-Groups-used-in-all-Access/m-p/77557#M4550</link>
      <description>&lt;P&gt;Ah, I now understand, ok. I'll try that. I must have done it like that by accident the first time it was working for another command.&lt;/P&gt;</description>
      <pubDate>Sat, 07 Mar 2020 15:40:15 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli-command-needed-to-list-all-AD-Groups-used-in-all-Access/m-p/77557#M4550</guid>
      <dc:creator>Carsten_Weber</dc:creator>
      <dc:date>2020-03-07T15:40:15Z</dc:date>
    </item>
    <item>
      <title>Re: mgmt_cli command needed to list all AD-Groups used in all Access Roles</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli-command-needed-to-list-all-AD-Groups-used-in-all-Access/m-p/77572#M4551</link>
      <description>It goes back to what I explained last week here: &lt;A href="https://community.checkpoint.com/t5/API-CLI-Discussion-and-Samples/Showing-existing-Access-Role-results-in-error/m-p/76609/highlight/true#M4473" target="_blank"&gt;https://community.checkpoint.com/t5/API-CLI-Discussion-and-Samples/Showing-existing-Access-Role-results-in-error/m-p/76609/highlight/true#M4473&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;To work with mgmt_cli/mgmt you have to operate the way the API expects.&lt;BR /&gt;-r true is a "shortcut" that handles all the steps for you.&lt;BR /&gt;-r true requires --domain in an MDS environment to ensure you are working on the correct domain.&lt;BR /&gt;Otherwise, the only time you specify the domain as part of the login process.&lt;BR /&gt;Note that a session can only operate within a single domain.&lt;BR /&gt;Make sense?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sat, 07 Mar 2020 22:27:05 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli-command-needed-to-list-all-AD-Groups-used-in-all-Access/m-p/77572#M4551</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2020-03-07T22:27:05Z</dc:date>
    </item>
    <item>
      <title>Re: mgmt_cli command needed to list all AD-Groups used in all Access Roles</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli-command-needed-to-list-all-AD-Groups-used-in-all-Access/m-p/86076#M4892</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I posted a solution under the following forum post: &lt;A title="Showing existing Access Role results in error" href="https://community.checkpoint.com/t5/API-CLI-Discussion-and-Samples/Showing-existing-Access-Role-results-in-error/m-p/86075/highlight/true#M4891" target="_blank" rel="noopener"&gt;here&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for all the imput that helped me working this out!&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Carsten&lt;/P&gt;</description>
      <pubDate>Fri, 22 May 2020 14:54:26 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli-command-needed-to-list-all-AD-Groups-used-in-all-Access/m-p/86076#M4892</guid>
      <dc:creator>Carsten_Weber</dc:creator>
      <dc:date>2020-05-22T14:54:26Z</dc:date>
    </item>
  </channel>
</rss>

