UserProfileService.AddColleague method

Adds a colleague for the specified account name.

Namespace:  WebSvcUserProfileService
Assembly:  UserProfileServices (in UserProfileServices.dll)

Syntax

'Declaration
<SoapDocumentMethodAttribute("http://microsoft.com/webservices/SharePointPortalServer/UserProfileService/AddColleague", RequestNamespace := "http://microsoft.com/webservices/SharePointPortalServer/UserProfileService",  _
    ResponseNamespace := "http://microsoft.com/webservices/SharePointPortalServer/UserProfileService",  _
    Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Function AddColleague ( _
    accountName As String, _
    colleagueAccountName As String, _
    group As String, _
    privacy As Privacy, _
    isInWorkGroup As Boolean _
) As ContactData
'Usage
Dim instance As UserProfileService
Dim accountName As String
Dim colleagueAccountName As String
Dim group As String
Dim privacy As Privacy
Dim isInWorkGroup As Boolean
Dim returnValue As ContactData

returnValue = instance.AddColleague(accountName, _
    colleagueAccountName, group, privacy, _
    isInWorkGroup)
[SoapDocumentMethodAttribute("http://microsoft.com/webservices/SharePointPortalServer/UserProfileService/AddColleague", RequestNamespace = "http://microsoft.com/webservices/SharePointPortalServer/UserProfileService", 
    ResponseNamespace = "http://microsoft.com/webservices/SharePointPortalServer/UserProfileService", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public ContactData AddColleague(
    string accountName,
    string colleagueAccountName,
    string group,
    Privacy privacy,
    bool isInWorkGroup
)

Parameters

  • accountName
    Type: System.String

    The account name of the user to add a colleague to.

  • colleagueAccountName
    Type: System.String

    The account name of the colleague to add.

  • group
    Type: System.String

    The group to which the colleague is a member.

  • isInWorkGroup
    Type: System.Boolean

    true to indicate that the colleague should be part of a workgroup; otherwise, false.

Return value

Type: WebSvcUserProfileService.ContactData
The newly added colleague.

Exceptions

Exception Condition
SoapException

The colleague cannot be added.

Remarks

This method adds a new colleague with specified information for the user specified by the accountName parameter, and returns the information about the new colleague.

See also

Reference

UserProfileService class

UserProfileService members

WebSvcUserProfileService namespace