Removing users from Site Admin
Question ID: 104893
2
0

We have a lot of inactive users in Site Admin. Can these be removed from the database? If so, where would I look for this?

Marked as spam
Posted by (Questions: 122, Answers: 3)
Asked on March 12, 2013 7:28 pm
122 views
Answers (2)
2
Private answer

Lungri,

I have a script that would assist in the bulk removal of users. This script would not have the same adverse side effects as removing the user from the database as it uses the Site Admin API to remove the user instead. This would be the same as if you actually clicked the remove button in site admin. To use this, populate a list of users you would like to remove in an Excel document, then execute this script as a macro (be sure to input your server URL and site admin login info).

Public Sub RemoveSiteUser()
   
    Dim rCount
    
    rCount = ActiveSheet.UsedRange.Rows.Count
    
    Dim qcServer, qcUser, qcPassword, UserId
    
    qcServer = ServerURL
    qcUser = SiteAdminUser
    qcPassword = SiteAdminPass
    
    For i = 2 To rCount
        UserId = ActiveSheet.Range(''A'' & i).Value

        Set objSA = CreateObject(''SAClient.SAapi.9'')
        
        objSA.Login qcServer, qcUser, qcPassword
        
        On Error Resume Next
        
        objSA.DeleteUser UserId
            If (Err.Number = 0) Then
                ActiveSheet.Range(''B'' & i).Value = ''User Deleted''
            End If
        On Error GoTo 0
        
        objSA.Logout
        
    Set objSA = Nothing
    
    Next
   
End Sub


Marked as spam
Posted by (Questions: 3, Answers: 168)
Answered on March 12, 2013 7:31 pm
0
@Jafar , Would you please share vba or OTA or SA API to remove users (say 10 users) from a project in ALM in a singleshot? I am able to deactivate, deleted from ALM. But not able to remove from ALM project.
( at December 6, 2018 5:44 am)
1
Private answer

Good to go. You're the best, Jafar.

Marked as spam
Posted by (Questions: 122, Answers: 3)
Answered on March 12, 2013 7:39 pm
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top