ALM Site Administration API Type Library
SetUserProperty Method
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)
  • SA_USER_US_IDP_NAME (value: 10)
  • SA_USER_US_IDENTITY_KEY (value: 11)
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:

  • 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
<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>
    <US_IDP_NAME>alm</US_IDP_NAME>
    <US_IDENTITY_KEY>elaine keller</US_IDENTITY_KEY>
</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