ALM Site Administration API Type Library
SetUserProperty Method
Sets a specific user property and retrieves the user properties.
Visual Basic
Public Function SetUserProperty( _
   ByVal UserName As String, _
   ByVal PropertyNumber As Long, _
   ByVal PropertyValue As String _
) As String
The user name.

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)
  • SA_USER_US_IDP_NAME (value: 10)
  • SA_USER_US_IDENTITY_KEY (value: 11)

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:

  • USER_ID    -    The user ID number.
  • USER_NAME    -     The user name.
  • ACC_IS_ACTIVE    -    For internal use.
  • FULL_NAME    -    Full name of user.
  • DOMAIN_ID    -    For internal use.
  • DOMAIN_NAME    -    For internal use.
  • EMAIL    -    The email of the user.
  • USER_PASSWORD    -    The encryption of the user password.
  • DESCRIPTION    -    The description of the user.
  • PHONE_NUMBER    -    The phone number of the user.
  • US_IDP_NAME     -    The IdP ID of the user.
  • US_IDENTITY_KEY    -    The identity key of the user.
Return Value Example
    <FULL_NAME> Alex Dashevsky </FULL_NAME>
    <US_IDENTITY_KEY>elaine keller</US_IDENTITY_KEY>
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
    MsgBox "Program failed:" + err.Description
End Sub
See Also