3.1.5.76 proc_SecGetPrincipalByIdEx

The proc_SecGetPrincipalByIdEx stored procedure is invoked to return information about a principal based on a specified user identifier or a collection of principals based on a specified site group identifier. The proc_SecGetPrincipalByIdEx stored procedure is similar to the proc_SecGetPrincipalById stored procedure, except that the proc_SecGetPrincipalByIdEx stored procedure also returns the principal's mobile phone information.

 PROCEDURE proc_SecGetPrincipalByIdEx (
       @SiteId                        uniqueidentifier,
       @PrincipalId                   int,
       @GetSTSToken                   bit                = 0,
       @GetExternalToken              bit                = 0,
       @GetExpandedSTSGroup           bit                = 0,
       @RequestGuid                   uniqueidentifier   = NULL OUTPUT
 );

@SiteId: The Site Collection Identifier of the site collection containing the principal(s).

@PrincipalId: The site group identifier of the site group or user identifier of the principal(s) to return information for.

@GetSTSToken: If this parameter is set to 1, it indicates the tp_token value MUST be returned in both instances of the Principal User Information Result Set.

@GetExternalToken: If this parameter is set to 1, it indicates the tp_ExternalTokenLastUpdated and tp_ExternalToken values MUST be returned in both instances of the Principal User Information Result Set.

@GetExpandedSTSGroup: If this parameter is set to 1, it indicates a second Principal User Information Result Set MUST be returned when the first instance of the Principal User Information Result Set has zero rows. The second result set contains information about group membership for the site group represented by @PrincipalId. The rows returned in the second result set are all the members of that site group.

@RequestGuid: The optional request identifier for the current request.

Return Values: The proc_SecGetPrincipalById stored procedure returns an integer return code, which MUST be 0.

The proc_SecGetPrincipalByIdEx stored procedure MUST return one result set which can be returned either once or twice as described in the following.