Can't add LDAP Query Role to Static Role

Hello,

I have an LDAP Query role coming from a remote LDAP server.

When I try to add the role to a static role in the system directory service using

IDirectorySession session = DirectorySystemFactory.getDirectorySystem().createSession();
session.addPrincipalToRole(“LDAPQueryRole”, “systemRole”);

I get an error message saying:
[CommonLib.CDS.0002W] retrun null since DN [uid=administrator,ou=people,o=webmethods] doesn’t match baseDN [dc=bku,dc=db,dc=de]

If I add the role manually through the MWS Administration UI it works fine.

Do you know how to solve this issue?

Regards,
Georgi

Hi,

Which user is set when you are you running the code?
Does it have the same privileges as the user that sets the roles manually?

Also, it seems this function only works with static roles and static principals:
http://techcommunity.softwareag.com/ecosystem/documentation/webmethods/wmsuites/wmsuite8-2_sp2/My_webMethods/8-2-SP1_CAF_and_MWS_Java_API_Reference/com/webmethods/sc/directory/IDirectorySession.html#addPrincipalToRole(java.lang.String, java.lang.String)

Best Regards,