Highlighted
NEW_ALM12 Outstanding Contributor.
Outstanding Contributor.
523 views

Non-ldap username to LDAP username

Hi Team,
Here is my scenario: I am currently in ALM 11 with QC authentication. I have about 15k users whose username are Not from LDAP. Their username is like 123456789. Now, I am planning to migrate about 1200 projects out of ALM 11 to 12.21 then to ALM 12.55 ( I guess I cannot migrate directly from ALM 11 to ALM12.55, or CAN I?) . After I migrate from ALM 11 to ALM 12.21 / 12.55, I need to integrate ALM with LDAP. I know these version of ALM accepts multi LDAP setting which I can do.

But, my real challenging problem is that after i enable LDAP in ALM 12.21 / ALM 1255, (1) how I do I import my all 15k users? (2) How do i grant the same permission to that user whose username was Non-LDAP now start to use LDAP username? (3) After I enable and import 15k users, I will have duplicate of user (meaning same user will have his non-LDAP and LDAP username) in ALM; how do I get rid of 15k Non-LDAP username?

Please advise. Hope someone might have already gone through this phase.

Thank you in advance!

Tags (1)
0 Likes
5 Replies
jean_carlo1996 Regular Contributor.
Regular Contributor.

Re: Non-ldap username to LDAP username

Hi NEW_ALM12, unfortunatly , in your scenario you just have two options:

- Erase all the users existing in ALM and after that import all the user existing in LDAP.

- Import all the users existing in LDAP and after that erase the old users.

The problem is that you must do by each one.

Regards.

 

0 Likes
Knowledge Partner
Knowledge Partner

Re: Non-ldap username to LDAP username

Hi,

-----------------------------------------------------------------------------------------------------------
According to KM02972259, below is the upgrade path

From ALM/PC 11.00 : Projects must first be migrated to ALM 11.52

From ALM/PC 11.52 - 12.20 : We can Upgrade projects directly to ALM 12.55

Note: For PC projects, You must first upgrade LAB_ PROJECT, and then any

Performance Center template projects, before upgrading Performance Center projects.

From ALM 11 , you need to upgrade to ALM 11.52 holding latest patch

and then further to 12.55 holding its latest patch .

-----------------------------------------------------------------------------------------------------------

Regarding conversion of Non LDAP usernames to LDAP usernames,

I havent done this activity, my collegue has done this and provided following inputs,

Performing POC for confirming provided approach is advisible.

As a prerequisite , we need to have a Mapping document containing below information.

  • Non LDAP User Name
  • LDAP User Name
  • LDAP Full Name
  • LDAP Authentication Server
  • LDAP Domain Authentication
  • LDAP E-mail
  • LDAP Phone Number
  • LDAP Description

In order to get these details, you might provide list of email ids associated

with Non LDAP users  to your organization

LDAP or Active Directory team and request for their corresponding LDAP user details.

This will be the key information for any of our further steps. 

LDAP User Name, LDAP Full Name,LDAP Authentication Server,LDAP Domain Authentication,

LDAP E-mail, LDAP Phone Number,LDAP Description.

Once we have above information, Using Site Admin API "CreateUserEx()" method

we need to create all these LDAP users in our ALM site Admin using VBA code.

Refer to below link:

https://admhelp.microfocus.com/alm/en/12.55/api_refs/site_admin/topic29.html

Sub Main()
Dim objSAClient
objSAClient = CreateObject(“SAClient.SaApi.9”) 
objSAClient.login(“http://xxx:8080/qcbin", “user_name”, “password”)
objSAClient.CreateUserEx(“UserID”, “UserName”, “EmailID”, “PhoneNumber”, “Random Title”, “dummyPassword”, “uniqueIdentifier=LLLLLL,ou=people,dc=Enterprise,dc=BABBA,dc=com”)
End Sub

Next, using SQL queries we have to update migrated PROJECT USERS table

(update Non LDAP user names to LDAP user names) using Mapping document information.

Same SQL query update have to be done for entity field columns that are referring to USERS list

and which had old NON LDAP user names ( ex: Detected By defect field ).

We need involve HP for their recommendation on what all columns for which all

entitys have to be updated with new LDAP user name.

I think, since we are just updating the User Name their associated groups will remain same,

there is no need to remap all the groups to the LDAP users.

Finally using below SA API code, we can delete all the NON LDAP users for site admin:

https://admhelp.microfocus.com/alm/en/12.55/api_refs/site_admin/webframe.html#topic37.html

Private Sub DeleteUser()

'The following Visual Basic example deletes a user.
    Dim sReply As String

    On Error GoTo err
    sReply = m_SAClient.DeleteUser("alex_td")
    If (sReply = "1") Then
        MsgBox "User Deleted"
    End If
    Exit Sub

err:
    MsgBox "Program failed:" + err.Description
End Sub

Regards,Srihari 

0 Likes
NEW_ALM12 Outstanding Contributor.
Outstanding Contributor.

Re: Non-ldap username to LDAP username

@Srihari-, thank you for the advise. I would have to head down and take it to my Stage environemnet to test with less number of Non-ladp user.

However, before i do that I have some doubts. Hope you wont mind answering my silly doubts.

1) You mention that "we need to create all these LDAP users in our ALM site Admin using VBA code." You have given vb code. 1.a) Where do i run that VB code? 1.b) After i run the Vb code, will it create all users listed or just 1 user whose userId is mentione din vb script?

2) You also mention "Next, using SQL queries we have to update migrated PROJECT USERS table. (update Non LDAP user names to LDAP user names) using Mapping document information.

Would you please hand over the sql query to update migrated project user tables? Is this mass user update or single?

3) User deletion: per you rcode you have ," sReply = m_SAClient.DeleteUser("alex_td")".  3.a) Will this code delete all Non-ldap user at a time or in 1 shot? 3.b) Where do i run this block of code? 3.c) Is "alex_td" a Non-ldap user?

Hope to hear from you.

Thank you again.

0 Likes
Knowledge Partner
Knowledge Partner

Re: Non-ldap username to LDAP username

Hi NEW_ALM12,

Please find my below comments in blue:

1) You mention that "we need to create all these LDAP users in our ALM site Admin using VBA code."You have given vb code.

1.a) Where do i run that VB code?

We can run it from  Visual Basic editor ( Alt + F11 ) in Excel.

On how to create a VBA code, you can refer below link:

https://www.youtube.com/watch?v=ABXPb0qnKUY&list=PLS7iHfqXNVhK3yzd_4XS5k4zsvnu2mkJC

for learning on how to do programming using VBA , you can go through these tutorials:

https://www.youtube.com/playlist?list=PLS7iHfqXNVhK3yzd_4XS5k4zsvnu2mkJC

1.b) After i run the Vb code, will it create all users listed or just 1 user whose userId is mentione din vb script?

Code provided is just for example:

https://admhelp.microfocus.com/alm/en/12.55/api_refs/site_admin/topic29.html

Basically below code will create only single user in Site Admin Users List. 

Sub Main()
Dim objSAClient
objSAClient = CreateObject(“SAClient.SaApi.9”) 
objSAClient.login(“http://xxx:8080/qcbin", “user_name”, “password”)
objSAClient.CreateUserEx(“UserID”, “UserName”, “EmailID”, “PhoneNumber”_
, “Random Title”, “dummyPassword”, “uniqueIdentifier=LLLLLL,ou=people,_
dc=Enterprise,dc=BABBA,dc=com”) End Sub

What you need to do is: execute above provided code for all the users present in the spreadsheet.

try something like getting the Last Row of the used range from excel spreadsheet using VBA code,

something like below: 

LastRow = ThisWorkbook.Sheets("Worksheet Name").UsedRange.Rows.Count

Post that, create a loop, something like below 

For i = 3 To LastRow
'  Here write the code for adding each different user to SA using above provided code logic
Next

 Each user should be fetched from Excel spreadsheet column using Loop condition.I recommend

to use excel debug features like "Step Into (F8)" and "Immediate window" in case if debugging is required.

2) You also mention "Next, using SQL queries we have to update migrated PROJECT USERS table.

(update Non LDAP user names to LDAP user names) using Mapping document information.

Would you please hand over the sql query to update migrated project user tables?

Is this mass user update or single?

As mentioned in my previous post, I havent done this activity,

so I donot have the queries handy.

What I would do is, In each module I will look for those fields which are tied up to lookup list "USERS",

for example "Detected By" field in DEFECTS module.

For that specific field columns( ex: BG_DETECTED_BY)  in their project database table (ex: BUG ) , 

I will build up a query to update old Non LDAP user names with their corresponding LDAP user names.

Before performing this activity, take approval from your compliance manager

on whether you can go ahead with this update.

You may also raise a support case with MicroFocus stating that you have a requirement for

updating Non LDAP User names to LDAP user names and ask them

"For which database columns belonging to what all project tables, this (Non LDAP to LDAP) user name update has to be performed?"

3) User deletion: per you rcode you have ," sReply = m_SAClient.DeleteUser("alex_td")".  3.a) Will this code delete all Non-ldap user at a time or in 1 shot? 3.b) Where do i run this block of code? 3.c) Is "alex_td" a Non-ldap user?

Same as answer for 1. Provided code is an example for deleting just 1 user based on user name.,

you need to loop through excel column for each user and perform user removal using VBA code.

See below code from Jafar for reference:

http://eyeontesting.com/questions/3860/removing-users-from-site-admin.html

Regards,Srihari

0 Likes
NEW_ALM12 Outstanding Contributor.
Outstanding Contributor.

Re: Non-ldap username to LDAP username

@Srihari-, Thank you again.

I will try this and keep this thread updated. Hope I do not have to scratch my head too much.

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.