Symantec Access Management

Expand all | Collapse all

CLI to get authscheme name of a realm

Jump to Best Answer
  • 1.  CLI to get authscheme name of a realm

    Posted 06-15-2019 03:00 AM
    Trying to write a perl script to retrieve the authscheme of each realm in each domain:
    # Policy Server info
    use Netegrity::PolicyMgtAPI;
    $policyapi = Netegrity::PolicyMgtAPI->New();
    $session = $policyapi->CreateSession("siteminder","xxxxxxx");
    if ($session == undef) {
    print "Failed to connect to policy server\n";

    print " Connected to policy server successfully\n";

    print "\n\n******************************************\n\n";

    @domains = $session->GetAllDomains();

    print FILE "Domain Names, Realm Names\n";

    foreach $domain(@domains) {
    #print FILE $domain->Name()."\n";
    #print FILE $domain->Name().",";
    print "Domain Name\n\n";

    foreach $realm(@realms) {
    #print FILE ",";
    print FILE $domain->Name().",";
    print FILE $realm->Name().",";
    print FILE $realm->AuthScheme().",";


    How can i get to print the authscheme name instead in the output?


  • 2.  RE: CLI to get authscheme name of a realm
    Best Answer

    Posted 07-08-2019 04:01 PM
    Here is what we use to print some realm info...

    ## Loop thru realms for this domain...
    foreach $realm(@realms) {
    print FILE "\n" . $domain->Name() . "," . $realm->Name() . "," . $realm->ResourceFilter() . "," . $realm->ProtectResource() . "," . $realm->Description() . "," . $ascheme->Name() . "," . $ascheme->CustomParam();