Mass Deactivation of users

Question ID: 108734
0
0

IS there any OTA script available to deactivate list of users ?
We need to deactivate around 400 users

Marked as spam
Posted by (Questions: 89, Answers: 0)
Asked on November 1, 2018 1:03 am
9 views
Answers (1)
0
Private answer

QC/ALM users accouts are stored in the Site Admin database. The OTA API will not allow you to access this. You will have to use the Site Admin API (see the link below) if you would like to manage users. There is a deactivation method within this API. There are no example scripts like in the OTA API for the QC/ALM client.

https://admhelp.microfocus.com/alm/en/12.53/api_refs/site_admin/webframe.html

Here is a basic example of how to use the Site Admin API to deactivate a user...

Dim objSAClient
Dim strSvrURL
Dim strUserName
Dim strPassword

'Create the connection object
Set objSAClient = CreateObject(''SAClient.SAapi'')

'get Server URL, UserName, and Password
strSvrURL = InputBox (''Enter the server URL'')
strUserName = InputBox (''Enter the user name'')
strPassword = InputBox (''Enter the user's password'')

'MsgBox ''URL: '' & strSvrURL & vbCrLf & ''UserName: '' & strUserName & vbCrLf & ''Password: '' & strPassword

'actual login to server
objSAClient.Login strSvrURL, strUserName, strPassword

'deactivate the user
objSAClient.DeactivateUser(''Alex_ALM'')

objSAClient.Logout

Marked as spam
Posted by (Questions: 0, Answers: 297)
Answered on November 1, 2018 1:06 am
It worked now, I was able to deactivate a sample user, I will complete the code for mass deactivation
( at November 1, 2018 1:07 am)