Login Method
Description
Logs the specified user with either pair: username and password, or API key and API secret on to the site administration application.
In SSO mode, you can only use this method with API key and API secret to log in. Alternatively, you can log in by using the LoginWithApiKey method.
Note: This method supports login with API key and API secret in ALM 15.5.1 and later. In earlier versions, it only supports login with username and password.
Syntax
Parameters
- ServerURL
- The URL in the format http://<server name>[:<port>]/qcbin.
- UserName
- The user name defined in the ALM database.
- password
- The user's password.
Example
Private Function LogOn(URL As String, UserName As String, pwd As String) As Boolean On Error GoTo LogOnErr ' Get administrator connection If m_SAClient Is Nothing Then Set m_SAClient = New SAapi 'Note: Release this connection before program exits, for example, ' in Form_Unload event ' Set m_SAClient = Nothing 'Log on m_SAClient.Login URL, UserName, pwd LogOn = PASS Exit Function LogOnErr: LogOn = FAIL MsgBox "Logon Failed" + err.Description End Function
See Also

