AddPJAccount Method
Description
Creates a new Microsoft Office Project Server 2003 authenticated account in the Project Server 2003 database using the Project Server security object.
Syntax
Function AddPJAccount( _
ByVal bstrPJAccount As String, _
ByVal bstrPasswd As String, _
ByVal bstrEmail As String, _
ByVal bstrPhonetic As String, _
ByVal bstrGrpGUIDs As String, _
ByVal bstrGlobalPerm As String, _
ByVal bstrCatPerm As String, _
ByVal lHashedPwd0 As Long, _
ByVal lHashedPwd1 As Long, _
ByVal lAdminRandomSeed0 As Long, _
ByVal lAdminRandomSeed1 As Long _
) As Long
Parameters
Parameter | Description |
---|---|
bstrPJAccount |
Required String. The name of this Project Server account. |
bstrPasswd |
Required String. The password associated with this account. |
bstrEmail |
Required String. The e-mail account associated with this account. |
bstrPhonetic |
Required String. The phonetic spelling of bstrPJAccount. Note The phonetic spelling is used only for a Locale ID (LCID) of 1041, which is for Japanese. 1033 is the LCID for U.S. English. If the LCID is not 1041, use an empty string (""). |
bstrGrpGUIDs |
Required String. Comma-separated list of the GUIDs for the groups in which this user is a member. |
bstrGlobalPerm |
Required String. The global permission settings for this group, in the format "101,2;102,1;". The string has the following parts:
|
bstrCatPerm |
Required String. The category security permission settings for the group, in the format "<101>508,2;509,1;<102>508,1;". The string has the following parts:
|
lHashedPwd0 |
Required Long. Obsolete parameter: Set to 0. |
lHashedPwd1 |
Required Long. Obsolete parameter: Set to 0. |
lAdminRandomSeed0 |
Required Long. Random number for security purposes. |
lAdminRandomSeed1 |
Required Long. Random number for security purposes. |
Return Value
The AddPJAccount method returns HRESULT as a Long (4-byte integer) value.
Remarks
See admin/sec_svr_users.asp for how Project Server uses AddNTAccount.
Example
The following Microsoft Visual Basic 6.0 example adds a new Project Server authenticated account.
Dim lResult as Long
Dim sGroupGuids as String
Dim lSeed1 as Long
Dim lSeed2 as Long
' Assign comma separated list of group GUIDs to sGroupGuids
' Assign long integer positive values to lSeed1 and lSeed2
Set oSec = CreateObject("PjSvrSecurity.PjSvrSecurity")
oSec.SetDBConnection "ProjectServer"
lResult = oSec.AddNTAccount("Project Account Name", "password", "pjAcct@domain.com", "", _
sGroupGuids, "101,2;102,1", "<101>508,2;509,1;<102>508,1;", _
0, 0, lSeed1, lSeed2)
Set oSec = Nothing