Hi All,
Working again with the PERL API trying to use the PolicyMgtRealm:AuthScheme() method to change an existing authentication scheme for a realm. My attempts are failing to actually make the change to the realm. Can anyone see where my logic or misunderstanding of this method is at please. The first image is the code I wrote, and the second image is the contents of the AuthUpdate file. It seems that looks OK, but when I check the Realm in XPSExplorer or AdminUI the Auth Scheme does not properly set to the new $scheme variable.
use warnings;
use Netegrity::PolicyMgtAPI;
my @resources;
$destFile="AuthUpdate.txt";
open(DEST,">".$destFile) || die "Open file error: $!";
print DEST "Auth Scheme Update for rusniaklab.com\n";
print DEST "Printed " . scalar(localtime)."";
$policyapi = Netegrity::PolicyMgtAPI->New();
$session = $policyapi->CreateSession("siteminder", "*PW*");
$domain = $session->GetDomain("sso2iis.rusniaklab.com");
$realm_to_update = $domain->GetRealm("sso2iis.rusniaklab.com index");
print DEST "\n Realm is called:" . $realm_to_update->Name();
$realmAuthScheme = $realm_to_update->AuthScheme();
print DEST "\n Realm original auth scheme is: " . $realmAuthScheme->Name();
$scheme = $realmAuthScheme->Name(testBasicAuth);
print DEST "\nNEW SCHEME TO UPDATE IS: " . $scheme;
$realm_to_update->AuthScheme($scheme);
print "\nAuth Scheme report written to " . $destFile."\n";
Auth Scheme Update for rusniaklab.com
Printed Tue Jul 12 08:10:12 2016
Realm is called:sso2iis.rusniaklab.com index
Realm original auth scheme is: ssoIIS Forms Authentication
NEW SCHEME TO UPDATE IS: testBasicAuth
Thank you for your time,
Adam