Highlighted
BigDaddy0 Honored Contributor.
Honored Contributor.
678 views

ALM 12.55 CreateUserEx not able to set LDAP Authentication Server Dropdown

Jump to solution

I'm trying to update my Add User script that I created for 12.01 and use it in 12.55.

The CreateUserEx Method doesn't seem to have changed at all so I'm able to add users, but I noticed that there does not seem to be a way to set the value in the LDAP Authentication Server dropdown field.  When I look at the new users in the Site Admin page, the field is empty.

I don't see anything in the SA API Ref for that field either.  Anybody have some ideas on

A- How to add a LDAP Authentication Server to a user

B- How to even get the LDAP Authentication Servers to pick from?

 

Thanks,

Mike

Tags (1)
0 Likes
1 Solution

Accepted Solutions
BigDaddy0 Honored Contributor.
Honored Contributor.

Re: ALM 12.55 CreateUserEx not able to set LDAP Authentication Server Dropdown

Jump to solution

So, turns out it's a known issue and there is already a bug reported for this and it's marked as Deferred.  QCCR1J89216

I did find a workaround that's not very easy but it works for me.

Pull the LDS_ID for the LDAP Authentication Server.  WIll most likly be 1.  I'm also pulling LDS_BASE to use for my AD lookup when pulling the fqdn and other required user info.

Select LDS_ID, LDS_BASE From qcsiteadmin_db.dbo.LDAP_SERVERS


Connect to the SAclient
Perform a SAclient.GetAllUsers() to retrieve an XML with all current users data

Ensure the UserName we are about to add is not already there by using an InStr(xml, "<USER_NAME>" & UserName & "</USER_NAME>")

If not found then add using
xmlNew = SAclient.CreateUserEX(all values pulled from AD query)

This will return a xml in the same format as the .GetAllUsers but will be for just this newly added user
Get the new users ID from there stored in "<USER_ID>###</USER_ID>"


Disconnect from the SAClient

Update that user using the OTAclient like
Update qcsiteadmin_db.dbo.USERS_AUTH_DATA set UAD_VALUE = " & lds_id & "  where UAD_USER_ID = " & user_id & " and UAD_KEY = 'LDAP_SERVER_ID'"

0 Likes
2 Replies
BigDaddy0 Honored Contributor.
Honored Contributor.

Re: ALM 12.55 CreateUserEx not able to set LDAP Authentication Server Dropdown

Jump to solution

So, turns out it's a known issue and there is already a bug reported for this and it's marked as Deferred.  QCCR1J89216

I did find a workaround that's not very easy but it works for me.

Pull the LDS_ID for the LDAP Authentication Server.  WIll most likly be 1.  I'm also pulling LDS_BASE to use for my AD lookup when pulling the fqdn and other required user info.

Select LDS_ID, LDS_BASE From qcsiteadmin_db.dbo.LDAP_SERVERS


Connect to the SAclient
Perform a SAclient.GetAllUsers() to retrieve an XML with all current users data

Ensure the UserName we are about to add is not already there by using an InStr(xml, "<USER_NAME>" & UserName & "</USER_NAME>")

If not found then add using
xmlNew = SAclient.CreateUserEX(all values pulled from AD query)

This will return a xml in the same format as the .GetAllUsers but will be for just this newly added user
Get the new users ID from there stored in "<USER_ID>###</USER_ID>"


Disconnect from the SAClient

Update that user using the OTAclient like
Update qcsiteadmin_db.dbo.USERS_AUTH_DATA set UAD_VALUE = " & lds_id & "  where UAD_USER_ID = " & user_id & " and UAD_KEY = 'LDAP_SERVER_ID'"

0 Likes
NEW_ALM12 Outstanding Contributor.
Outstanding Contributor.

Re: ALM 12.55 CreateUserEx not able to set LDAP Authentication Server Dropdown

Jump to solution

@BigDaddy0

This would be very useful to me as well as other who are in this forum. Would it be possible to Past the complete code here? Thank you in advance. 

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.