I have created users via vbs in the past but if the come from LDAP is there anything special to do?
Dim objSAClient, Response, UserToDomain, UserToGroup, ProjectName, domainName, objNodeList
Dim UserToAdd, UserFullName, UserMail, UserDescription, UserPhone, UserPsw
'this is like the TDConnection. This is the main obj to do
'everything on the siteadmin
Set objSAClient = CreateObject("SAClient.SAapi.9")
Const server = "http://112.232.1233.228:8080/sabin"
Const user = "nadmin3"
Const psw = ""
objSAClient.login server, user, psw
'All the saapi client method create an xml string so you need
'a variable (Response in this case) that contains the result of
'the called method.
'Now I create a NewUser in QC
UserToAdd = InputBox("User to create: Please Enter UserID: ","SiteAdmin AddUser")
UserFullName = InputBox("Please Enter FullName: ","SiteAdmin AddUser")
UserMail = InputBox("Please Enter User Email Address:","SiteAdmin AddUser")
UserDescription = InputBox("Enter The description of the user:","SiteAdmin AddUser")
UserPhone = InputBox("Enter the phone number for the user:","SiteAdmin AddUser")
UserPsw = InputBox("Enter the password for the user:","SiteAdmin AddUser")
Domain = InputBox("Enter the Domain: ", "SiteAdmin Adduser")
Project = InputBox("Enter the Project Name: ", "SiteAdmin Adduser")
Group = InputBox("Enter the Group Name:","SiteAdmin Adduser")
Response = objSAClient.CreateUser(UserToAdd, UserFullName, UserMail, UserPhone, UserDescription, UserPsw)
'wscript.echo "the result is: " & Response
'I check if CerateUser tag is present in the Response variable.
'if yes the user is added
'if no some error occured
if instr(Response,"<CreateUser>") <> 0 then
UserToDomain = objSAClient.AddUsersToProject(Domain, Project, UserToAdd)
UserToGroup = objSAClient.AddUsersToGroup(Domain, project, Group, UserToAdd)
msgbox("User " & UserToAdd & " Created and Added to " & Domain & " / " &Project & " Project ")
' wscript.echo "The User " & UserToAdd & " have been loaded correctly !"
'wscript.echo "Error to create user: " & UserToAdd
Msgbox ("User " & UserToAdd & "Already Exist")
set objSAClient = nothing