Share via


How to: Use FIM Certificate Management to Determine Connected Profiles and Requests

The following code examples for Forefront Identity Manager Certificate Management (FIM CM) show how to use the ClmUtils class to get a list of CSEntry objects that are joined to the MVEntry object that is being evaluated in the provisioning/deprovisioning code. The two types of CSEntry objects are clmRequest and clmProfile.

Get Connected Profiles

List<CSEntry> profileCSEntryList = GetConnectedProfiles(targetCLMMA)

' Check each of the profiles and see if there are any that already
' match the desired profile status.
Dim profileCSEntry As CSEntry
For Each profileCSEntry In  profileCSEntryList
    If profileCSEntry("pr_flags").IsPresent And
        profileCSEntry("pr_flags").IntegerValue = 1 Then

' TODO: Implement your provisioning action here.
    End If
Next profileCSEntry
List<CSEntry> profileCSEntryList =
    GetConnectedProfiles(targetCLMMA);

// Check each of the profiles and see if there are any that already
// match the desired profile status.
foreach (CSEntry profileCSEntry in profileCSEntryList)
{
    if ((profileCSEntry["pr_flags"].IsPresent) &&
        (profileCSEntry["pr_flags"].IntegerValue == 1 /*Primary*/))
    {

// TODO: Implement your provisioning action here.
    }
}

Get Connected Requests

List<CSEntry> requestCSEntryList =
    GetConnectedRequests(targetCLMMA,
    New Guid(csentry("profile_uuid").BinaryValue))

' Check each of the requests that are associated with that profile template
' and see if there are any that already match the requested type.
Dim requestCSEntry As CSEntry
For Each requestCSEntry In  requestCSEntryList
    If requestCSEntry("req_type").IsPresent And
        requestCSEntry("req_type").IntegerValue = 1 Then

' TODO: Implement your action here.
    End If
Next requestCSEntry
List<CSEntry> requestCSEntryList =
    GetConnectedRequests(targetCLMMA,
    new Guid(csentry["profile_uuid"].BinaryValue));

// Check each of the requests that are associated with that profile template
// and see if there are any that already match the requested type.
foreach (CSEntry requestCSEntry in requestCSEntryList)
{
    if ((requestCSEntry["req_type"].IsPresent) &&
        (requestCSEntry["req_type"].IntegerValue == 1 /*Enroll*/))
    {

// TODO: Implement your action here.
    }
}

See Also

Reference

ClmUtils

Concepts

Forefront Identity Manager Certificate Management Connected Data Sources