BusinessObjects Board

Adding SecWinAD alias to an existing user account using VBA (CMS SDK)?

Hi all,
Can anyone share VB examples of how to add a SecWinAD alias to a user account? Our 5K+ users have Enterprise aliases but we are in need of bulk-adding WinAD.
I’ve seen java examples to add SecEnterprise, but if anyone can share a VB.net/VBA equivalent of that java code to add WinAD, that would be very helpful.

Figured this would be akin to adding a new property to SI_ALIASES and tried the following. It doesn’t work. Where am I going wrong?

Set oSessionManager = CreateObject(“CrystalEnterprise.SessionMgr”)
Set oSess = oSessionManager.Logon(“username”, “pwd”, “hostname”, “secEnterprise”)
Set iStore = oSess.Service("", “InfoStore”)
queryString = “Select * from CI_SYSTEMOBJECTS where SI_KIND=‘User’”
Set CMSObjects = iStore.Query(queryString)

'test for 1st user in CMSObjects–
CMSObjects.Item(1).Properties.Item(“SI_ALIASES”).Properties.Add “secWinAD”, “CN=test,OU=Standard Users,OU=Users,OU=TEST,OU=TEST,DC=test,DC=com”, cePropFlagBag
iStore.Commit (CMSObjects)

Any help would be greatly appreciated!

Hi.
I just tested this, by adding a new Win AD alias to an existing Enterprise account.

    Dim u As User
    Set u = infostore.Query("select * from ci_systemobjects where si_kind = 'user' and si_name = 'xxxx").Item(1)
    
    u.Aliases.AddNew ("secWinAD:yyyy")

Note that this is only really necessary if your existing Enterprise account name is different than the AD account name. In CMC → Authentication → Windows AD, check this option: Assign each new AD alias to an existing User Account with the same name. If it’s set, then you won’t need to create the aliases ahead of time.