Share via


Managed Active Directory::CreateContact

The CreateContact method creates a contact.

Arguments

Input Arguments Required Description

<container>

Yes

The Lightweight Directory Access Protocol (LDAP) path of the container to add the contact to

<name>

Yes

The name of the contact to be created

<properties>

No

Properties to store with the contact

Remarks

Security

  • Impersonate caller.

Sample Code

Example XML Request

<request> 
   <procedure> 
     <execute namespace="Managed Active Directory" procedure="CreateContact" impersonate="1"> 
       <executeData> 
         <container>LDAP://OU=Hosting,DC=contoso,DC=com</container> 
         <name>Kevin Browne</name> 
         <properties> 
           <property name="displayName">Kevin F. Browne</property> 
           <property name="givenName">Kevin</property> 
           <property name="middleName">F</property> 
           <property name="sn">Browne</property> 
           <property name="initials">KFB</property> 
           <property name="description">description of new contact</property> 
         </properties> 
       </executeData> 
       <after source="executeData" sourcePath="path" destination="data"mode="insert" />       
     </execute> 
  </procedure> 
</request>

Example XML Response

<response> 
  <data> 
    <path>LDAP://cn=Kevin Browne,OU=Hosting,DC=contoso,DC=com</path> 
  </data> 
</response>

Applies To

Managed Active Directory Namespace APIManaged Active Directory Namespace API for:

  • Hosted Messaging and Collaboration version 4.5

  • Hosted Messaging and Collaboration version 4.0

  • Hosted Messaging and Collaboration version 3.5

  • Hosted Messaging and Collaboration version 3.0

  • Windows-based Hosting version 4.5

  • Windows-based Hosting version 4.0

  • Windows-based Hosting version 3.5

  • Windows-based Hosting for Applications version 1.0

See also

Tasks

Managed Active Directory::ModifyContact
Managed Active Directory::RenameContact
Managed Active Directory::DeleteContact