Share via


externalSubmitTemporaryCardEnrollRequest

Submits a request to create a temporary smart card for the specified user. After the request is submitted, it will be processed in the same way as any other request within Forefront Identity Manager Certificate Management (FIM CM) and subject to the workflow and policy rules associated with the profile template.

This method can be used to create a temporary smart card for a user who already has a smart card issued. The temporary smart card will contain the archived certificates previously issued to the permanent smart card. Alternatively, a short lived, temporary smart card can be created.

externalSubmitTemporaryCardEnrollRequest
(
          @permanent_card_serial varchar(50) = NULL, --linked card
          @user_nt4name nvarchar(80),
          @profile_template_name nvarchar(254),
          @registration_data ntext = NULL,
           @comments nvarchar(256),
           @request_uuid uniqueidentifier OUTPUT,
           @request_priority tinyint = 0
)

Parameters

Parameter Description

@permanent_card_serial

[in] The serial number of the users permanent smart card, prefixed with the manufacturer identification number. This parameter can be NULL. If the value is NULL, this card is not linked to the user's permanent card.

@user_nt4name

[in] The domain or username of the user for whom the smart card creation should be initiated. The username is in the Windows NT 4.0 format.

@profile_template_name

[in] The name of the profile template for which the user receives the temporary card. For temporary smart cards associated with a permanent smart card, the profile template needs to match the permanent card profile name. Otherwise, this can be a different profile name than the permanent card profile name.

@registration_data

[in] An XML document that contains the name/value pairs for any data that is required for the FIM CM profile template temporary policy. This parameter can be NULL.

@comments

[in] Comment stored for the request. This parameter can be NULL.

@request_uuid

[out] A UUID that is the unique identifier for the submitted request. This identifier can be used to determine the status of the request using the externalGetStatus stored procedure.

@request_priority

[in] An integer value between 0 and 255 indicating the priority of the request. Zero is the highest priority and 255 is the lowest. This parameter can be NULL.

Return Value

Zero if the procedure succeeds, otherwise one of the following error codes.

Value Meaning

-1

The cause of the error is unknown.

-2

The attempt to create the request failed.

-3

The data is not valid.

-4

The attempt to submit the request failed.

Example

The following code example shows how to submit a request for a temporary smart card.

DECLARE @RC                    int
DECLARE @permanent_card_serial varchar(50)
DECLARE @user_nt4name          nvarchar(80)
DECLARE @profile_template_name nvarchar(254)
DECLARE @comments              nvarchar(256)
DECLARE @request_uuid          uniqueidentifier

-- Set parameter values
SET @user_nt4name = N'clm-test\subscriber01'
SET @profile_template_name = N'Clm-SC-1'
SET @comments = N'Temp Card Enroll Request Submitted by External Api (with comments)'

EXEC @RC = [clm].[dbo].[externalSubmitTemporaryCardEnrollRequest] 
                        NULL, 
                        @user_nt4name,
                        @profile_template_name,
                        NULL, 
                        @comments, 
                        @request_uuid OUTPUT 

PRINT @request_uuid
PRINT @RC

Requirements

Microsoft SQL ServerĀ® 2005 Service Pack 1 or SQL Server 2000 Service Pack 4

See Also

Concepts

FIM CM SQL API Procedures
FIM CM SQL API Overview