PSNewUser Method

Description

Adds one or more new users to Microsoft Office Project Server 2003 as Project Server users. This method does not affect membership in the Enterprise Resource Pool.

Syntax

<Request>
   <PSNewUser>
      <PSUsers>
         <PSUser>
            <PSUserName></PSUserName>
            <PSUserNTAccount></PSUserNTAccount>
            <PSUserADGUID></PSUserADGUID>
            <PSUserEmail></PSUserEmail>
            <PSUserPhonetic></PSUserPhonetic>
            <PSGroups>
               <PSGroup>
                  <PSGroupName></PSGroupName>
               </PSGroup>
            </PSGroups>
         </PSUser>
      </PSUsers>
   </PSNewUser>
</Request>

Parameters

PSUser* with *PSUserName

Required. The user name to add. You can add more than one user with multiple PSUser nodes.

PSUserNTAccount

Optional. The Microsoft Windows NT account name of the user specified by PSUSerName.

PSUserADGUID

Optional. The Active Directory GUID of the user specified by PSUSerName. If PSUserADGUID is specified, PSUserNTAccount is also required.

PSUserEmail

Optional. The e-mail address of the user specified by PSUSerName.

PSGroups

Optional. The Project Server groups to which the user specified by PSUSerName belongs. A user may be a member of more than one group.

PSUserPhonetic

Optional. The phonetic spelling of the user specified by PSUSerName. This applies to the Japanese version of Project Server.

Return Value

If the request is successful, PSNewUser returns a successful HRESULT and STATUS as well as the PSUserName values for each created user.

If any requested user additions fail, the PDS returns an error code for each failure. Any failures result in a non-zero STATUS code. Processing continues for all of the requested new users, even after a failure.

<Reply>
   <HRESULT></HRESULT>
   <STATUS></STATUS>
   <UserName></UserName>
   <PSUsers>
      <PSUser>
         <PSUserName></PSUserName>
      </PSUser>
   </PSUsers>
   <Errors>
      <Error>
         <PSUserName></PSUserName>
         <ErrorCode></ErrorCode>
      </Error>
   </Errors>
</Reply>

Remarks

The currently logged-on user must have the appropriate Project Server permission in order to see the Manage Users and Groups page and create new users; the PDS checks to determine whether that user has been granted permission to manage users and groups (PermissionID 710).

PSNewUser can fail with a STATUS code of 9201 (rsExceptionPSNewUser) in a variety of circumstances, as when a SQL Server or network connection goes down. A failure also occurs if the user tries to add a new user to the same group twice.

PSNewUser creates Project Web Access user accounts with empty passwords.