Get Contact Info operation

The Get Contact Info operation retrieves contact objects information in the organization. 

Important

BMC recommends that you specify a single attribute in the <parameter> element to retrieve a concise response.

The following table describes the elements for the <items> XML element and adapter request for the Get Contact Info operation. 

Elements for the <items> XML for the Get Contact Info operation

Input elementDescriptionRequired

<target>

Specifies the target for the request 

If this element is not present, the adapter uses the default target specified in its configuration.

No

<host>

Specifies the host name or IP address of the remote computer 

To specify a dynamic target, you must use this element.

No

<user-name>

Specifies the user name for remote host authentication 

To specify a dynamic target, you must use this element.

No

<password>

Specifies the password that corresponds to the user name 

To specify a dynamic target, you must use this element.

No

<commands>

Indicates the beginning of the <commands> element, which contains the individual <command> elements

Yes

<command>

Indicates the beginning of a <command> element, which contains the elements that specify the operation to execute and its parameters

Yes

<active-directory-command>

Specifies the operation to execute 

Default value: Get Contact

Yes

<object-class>

Specifies the type of object on which to perform the operation 

Default value: Contact

Yes

<object-distinguished-name>

Specifies the distinguished name of the contact that you want to retrieve

For example: CN=MyContact,OU=TestOU,DC=punbnadv21,DC=local

Yes

<parameters>

Contains the list of empty XML elements for the attributes that you want to retrieve

For example:

<parameters>
	<distinguished-name/>
	<first-name/>
	<middle-initial/>
	<last-name/>
	<display-name/>
	<description/>
	<office-location/>
	<phone-number/>
	<email/>
	<home-phone-number/>
	<pager-number/>
	<cell-phone-number/>
	<fax-number/>
	<ip-phone-number/>
	<title/>
	<department/>
	<company/>
</parameters>

Note

Specify one attribute at a time in the <parameter> element to retrieve a concise response. If you specify more than one attribute, the adapter response is long and difficult to decipher.

Yes

<server>

Specifies the remote server for the connection 

If the object belongs to an Active Directory service hosted on a remote server, you must use this element.

Conditional

<domain>

Specifies the remote domain for the connection 

If the object belongs to an Active Directory service hosted on a remote server, you must use this element.

Conditional

<user-name>

Specifies the logon user name for the remote server

Conditional

<password>

Specifies the password associated with the user name

Conditional

The following figure shows a sample adapter request for the Get Contact Info operation. 

Adapter request for the Get Contact Info operation

<request-data>
  <active-directory-request>
    <commands>
      <command>
        <active-directory-command>Get Contact Info</active-directory-command>
        <object-class>Contact</object-class>
        <object-distinguished-name>CN=Test,CN=Users,DC=punbnadv21,DC=local</object-distinguished-name>
        <parameters>
          <distinguished-name />
        </parameters>
      </command>
    </commands>
  </active-directory-request>
</request-data> 

The following figure shows a sample adapter response for the Get Contact Info operation:

Sample adapter response for the Get Contact Info operation

<active-directory-response>
  <metadata>
    <status>success</status>
  </metadata>
  <target-output host="vw-pun-bna-dv21.bmc.com">
    <metadata>
      <os-id>Windows Server 2008</os-id>
      <os-version>6.3.9600</os-version>
      <status>success</status>
    </metadata>
    <commands-output>
      <command-output>
        <metadata>
          <command>dsget contact "\"CN=Test,CN=Users,DC=punbnadv21,DC=local\"" -dn </command>
          <line-count>7</line-count>
          <execution-milliseconds>56969</execution-milliseconds>
          <exit-code>0</exit-code>
          <status>success</status>
        </metadata>
        <output>
          <line index="1">Copyright 2010 BMC Software Ltd, Version: 1.5  </line>
          <line index="2">Connecting to remote service...</line>
          <line index="3">Connected to remote host.</line>
          <line index="4">  dn                                       </line>
          <line index="5">  CN=Test,CN=Users,DC=punbnadv21,DC=local  </line>
          <line index="6">dsget succeeded</line>
          <line index="7">Remote application exited with code: 0 </line>
        </output>
      </command-output>
    </commands-output>
  </target-output>
</active-directory-response> 
Was this page helpful? Yes No Submitting... Thank you

Comments