ALM Site Administration API Type Library 12.50 and later
SetUserProperty Method
The user name.

The property number you wish to change. You can use the following constants or their values:

The property value. If you are setting the user password, it will automatically be encrypted and sent to the server.

When you get the password back from the server, in GetUser for example, you will see the encrypted value.

Description
Sets a specific user property and retrieves the user properties.
Syntax
Visual Basic
Public Function SetUserProperty( _
   ByVal UserName As String, _
   ByVal PropertyNumber As Long, _
   ByVal PropertyValue As String _
) As String
Parameters
UserName
The user name.
PropertyNumber

The property number you wish to change. You can use the following constants or their values:

  • SA_USER_FULL_NAME (value: 3)
  • SA_USER_EMAIL (value: 4)
  • SA_USER_PHONE_NUMBER (value: 5)
  • SA_USER_DESCRIPTION (value: 6)
  • SA_USER_PASSWORD (value: 7)
  • SA_USER_DOM_AUTH (value: 8)
  • SA_USER_REPORT_ROLE (value: 9)
PropertyValue

The property value. If you are setting the user password, it will automatically be encrypted and sent to the server.

When you get the password back from the server, in GetUser for example, you will see the encrypted value.

Return Type

On success, returns an XML string containing the user properties.

Return Value Details
The properties of the SetUserProperty XML return string:

Return Value Example
<GetUser>
    <USERS_VERSION>752</USERS_VERSION>
    <USER_ID>10</USER_ID>
    <USER_NAME>alex_td</USER_NAME>
    <ACC_IS_ACTIVE>Y</ACC_IS_ACTIVE>
    <FULL_NAME> Alex Dashevsky </FULL_NAME>
    <DOMAIN_ID>0</DOMAIN_ID>
    <DOMAIN_NAME>TEMPLATES</DOMAIN_NAME>
    <EMAIL>alex_td@tgg.com</EMAIL>
    <USER_PASSWORD>456469</USER_PASSWORD>
    <DESCRIPTION>QualityCenter_Demo</DESCRIPTION>
    <PHONE_NUMBER>301-3432778</PHONE_NUMBER>
</GetUser>
Example
Private Sub SetUserProperty()

'The following Visual Basic example sets the value of
' an existing user's full name.
    Dim sReply As String

    On Error GoTo err
    
    sReply = m_SAClient.SetUserProperty("alex_td", _
        SA_USER_FULL_NAME, "Alex Dashevsky")
    MsgBox sReply
    Exit Sub
err:
    MsgBox "Program failed:" + err.Description
End Sub
See Also

SAapi Object  | SAapi Members