We are using Perl CLI scripting to give some scoped administrators the ability to view objects in their assigned Domain, like Realms, Rules, and its settings. For this, we have administrators created with View permissions only for their specific Domain, and through the script we retrieve these details, and when we try to print the authentication scheme defined, we are getting the following error: "Can't call method "Name" on an undefined value".
If I try with the default superuser, or an administrator with full rights, then it works fine. Also, if we log in to AdminUI with the scoped administrator, we can see all its assigned objects, including the authentication scheme details.
How can we do this? Why we are getting the error?