ConnectionManager.AddActiveDirectoryConnection Method (ConnectionType, String, String, Boolean, String, String, SecureString, List<DirectoryServiceNamingContext>, String, String, String)

Adds an Active Directory connection for the current service context.

Namespace:  Microsoft.Office.Server.UserProfiles
Assembly:  Microsoft.Office.Server.UserProfiles (in Microsoft.Office.Server.UserProfiles.dll)

Syntax

'Declaration
Public Function AddActiveDirectoryConnection ( _
    type As ConnectionType, _
    displayName As String, _
    server As String, _
    useSSL As Boolean, _
    accountDomain As String, _
    accountUsername As String, _
    accountPassword As SecureString, _
    namingContexts As List(Of DirectoryServiceNamingContext), _
    spsClaimProviderTypeValue As String, _
    spsClaimProviderIdValue As String, _
    adClaimIDMapAttribute As String _
) As DirectoryServiceConnection
'Usage
Dim instance As ConnectionManager
Dim type As ConnectionType
Dim displayName As String
Dim server As String
Dim useSSL As Boolean
Dim accountDomain As String
Dim accountUsername As String
Dim accountPassword As SecureString
Dim namingContexts As List(Of DirectoryServiceNamingContext)
Dim spsClaimProviderTypeValue As String
Dim spsClaimProviderIdValue As String
Dim adClaimIDMapAttribute As String
Dim returnValue As DirectoryServiceConnection

returnValue = instance.AddActiveDirectoryConnection(type, _
    displayName, server, useSSL, accountDomain, _
    accountUsername, accountPassword, _
    namingContexts, spsClaimProviderTypeValue, _
    spsClaimProviderIdValue, adClaimIDMapAttribute)
public DirectoryServiceConnection AddActiveDirectoryConnection(
    ConnectionType type,
    string displayName,
    string server,
    bool useSSL,
    string accountDomain,
    string accountUsername,
    SecureString accountPassword,
    List<DirectoryServiceNamingContext> namingContexts,
    string spsClaimProviderTypeValue,
    string spsClaimProviderIdValue,
    string adClaimIDMapAttribute
)

Parameters

  • displayName
    Type: System.String

    The display name of the connection.

  • server
    Type: System.String

    The server associated with the connection.

  • useSSL
    Type: System.Boolean

    true to use SSL encryption for the connection; otherwise, false.

  • accountDomain
    Type: System.String

    The domain name associated with the connection credentials.

  • accountUsername
    Type: System.String

    The user name associated with the connection credentials.

  • spsClaimProviderTypeValue
    Type: System.String

    The type for the claims provider definition.

  • spsClaimProviderIdValue
    Type: System.String

    The ID of the claims provider for SharePoint Server.

  • adClaimIDMapAttribute
    Type: System.String

    The claim ID map attribute for Active Directory.

Return Value

Type: Microsoft.Office.Server.UserProfiles.DirectoryServiceConnection
The Active Directory connection for the current service context.

Exceptions

Exception Condition
DuplicateEntryException

The service context already has a connection with the same name as displayName.

Remarks

This method adds an Active Directory connection for the current service context. See User profile property data types for a table that lists the Active Directory Domain Services (AD DS) data types and the .NET data types that are compatible with the data types of SharePoint 2010 user profile properties. Also see Connection filter data types and operators for a table that lists the operators that are available for each Active Directory Domain Services (AD DS) data type.

See Also

Reference

ConnectionManager Class

ConnectionManager Members

AddActiveDirectoryConnection Overload

Microsoft.Office.Server.UserProfiles Namespace