Creates a Rational® ClearQuest® user account with LDAP authentication. Sets the new user account AuthenticationMode as LDAP_AUTHENTICATION.
The CreateUserLDAPAuthenticated method copies an LDAP attribute value from the LDAP user account to the ClearQuest user profile field to map an LDAP user name to a Rational ClearQuest user name.
If CQ_LOGIN_NAME is configured as the mapping field (using the installutil setcqldapmap subcommand to specify which Rational ClearQuest user profile field is used to correlate LDAP and ClearQuest user accounts), the CQ_user_name parameter must be identical to LDAP_login_name or set to a Null string.
VBScript
adminSession.CreateUserLDAPAuthenticated(LDAP_login_name, CQ_user_name)
Perl
$adminSession->CreateUserLDAPAuthenticated(LDAP_login_name, CQ_user_name);
VBScript
' Create a Rational ClearQuest admin session
set adminSession = CreateObject("ClearQuest.AdminSession")
' Logon as admin
adminSession.Logon "admin", "admin", ""
' Create an LDAP authenticated user
Dim cquser2 ' a user object
Dim ldap_login
Dim cq_username
Dim mode
' the user authentication mode
ldap_login = "myusername@us.ibm.com"
cq_username = "myusername"
StdOut "Creating LDAP authenticated user " & ldap_name & vbCrLf
Set cquser2 = admin_session.CreateUserLDAPAuthenticated(ldap_login, cq_username)
' verify the user authentication mode:
StdOut "Getting authentication mode for user " & cquser2.name & vbCrLf
mode = cquser2.GetAuthenticationMode
StdOut "user mode: " & CStr(mode) & vbCrLf
Perl
use CQPerlExt;
# Create a Rational ClearQuest admin session
$adminSession= CQAdminSession::Build();
#Logon as admin
$adminSession->Logon( "admin", "admin", "" );
my $ldap_login = "myusername@us.ibm.com";
my $cq_username = "myusername";
my $newUserObj;
$newUserObj = $adminSession->CreateUserLDAPAuthenticated($ldap_login, $cq_username);
# ...
CQAdminSession::Unbuild($adminSession);