Trying to write a perl script to get the Authentication URL's defined in all SAML 2.0 service providers under Affiliate Domain:
I can see each serviceprovider scalar value with the following code:
# Policy Server info
use Netegrity::PolicyMgtAPI;
$policyapi = Netegrity::PolicyMgtAPI->New();
$session = $policyapi->CreateSession("siteminder","xxxxx");
if ($session == undef) {
print "Failed to connect to policy server\n";
exit;
}
print " Connected to policy server successfully\n";
print "\n\n******************************************\n\n";
my @affdomains = ("affiliatedomain1");
foreach my $affdomain(@affdomains){
print "Getting all the ServiceProviders for $affdomain\n";
$affDom=$session->GetAffDomain($affdomain);
#@spvds = Netegrity::PolicyMgtAffDomain->GetAllSAMLServiceProviders();
@spvds = $affDom->GetAllSAMLServiceProviders();
foreach $spvd(@spvds){
print "\n".$affdomain.",". $spvd;
}
}
From this ServiceProvider scalar, i tried to get the serviceprovider name and athentication URL as follows:
$sp=$affDom->GetSAMLServiceProvider($spvd);
$spvdname = $sp->Property($SAML_NAME);
$spauthurl = $sp->Property($SAML_SP_AUTHENTICATION_URL);
But errors out as follows:
Can't call method "Property" on an undefined value at getAllSpsAuthurls.pl line 37
How can i retrieve the Property values from the ServiceProvider?
Any help is appreciated.
------------------------------
[Designation]
[City]
------------------------------