# EsbSetPassword

Description

EsbSetPassword() sets a user's password, erasing the existing password.

Syntax

    EsbSetPassword (hCtx, userName, Password)

    ByVal hCtx     As Long
    ByVal userName As String
    ByVal Password As String

Parameters

hCtx | Essbase VB API context handle.
userName | User name.
Password | New password for a user.

Return Value

None.

Notes

- To change a password, the caller must either have supervisor access, or be changing their own password.
- The new password takes effect the next time the user logs in.

Access

This function requires the caller to have Create/Delete User privilege (ESB_PRIV_USERCREATE) for the logged in server, unless they are setting their own password.

Example

    Declare Function EsbSetPassword Lib "ESBAPIW" (ByVal hCtx As Long, ByVal UserName As String, ByVal Password As String) As Long

    Sub ESB_SetPassword ()
       Dim sts As long
       Dim UserName As String
       Dim Password As String

       UserName = "Joseph"
       Password = "NewPassword"
       '*****************
       ' Set New password
       '*****************
       sts = EsbSetPassword (hCtx, UserName, Password)
    End Sub

See Also

EsbListUsers()
EsbSetUser()