The following code example shows how to submit a request to enroll a new smart card in Forefront Identity Manager Certificate Management (FIM CM) using the externalSubmitEnrollRequest procedure. The transaction is submitted to the SQL Server with the user name, FIM CM profile, and priority. The optional registration data parameter contains additional enrollment information that is required for the FIM CM profile. For more information, see the Understanding Registration Data topic.

  Copy Code
DECLARE @user_nt4name  nvarchar(80)
DECLARE @profile_template_name nvarchar(254)
DECLARE @comments  nvarchar(256)
DECLARE @request_uuid  uniqueidentifier
DECLARE @request_priority  tinyint

-- Set parameter values
SET @user_nt4name = N'clm-test\subscriber01'
SET @profile_template_name = N'Clm-SC-1C'
SET @comments = N'Enroll Request Submitted by External Api'
SET @request_priority = 1  

EXEC @RC = [clm].[dbo].[externalSubmitEnrollRequest]
				N'<?xml version="1.0" encoding="utf-16"?> 
					<RegistrationData xmlns:xsi=
							<DataItem StorageFlag="None">  
								<field>Manager Information</field> 
								<value>BVT Test Run</value> 
				@request_uuid OUTPUT, 

PRINT @request_uuid

See Also