ResolveNames 操作

ResolveNames 操作は、あいまいなメール アドレスと表示名を解決します。

ResolveNames 操作の使用

この操作を使用して、エイリアスを確認し、適切なメールボックス ユーザーに表示名を解決できます。 あいまいな名前が存在する場合、 ResolveNames 操作応答は、クライアント アプリケーションが名前を解決できるように、各メールボックス ユーザーに関する情報を提供します。

注釈

ResolveNames 応答は、最大 100 個の候補を返します。 返される 100 個の候補は、検索操作で検出された最初の 100 個です。

smtp や sip などのプレフィックス付きルーティングの種類を持つEmailアドレスは、複数値配列に保存されます。 ResolveNames 操作は、"sip:User1@Contoso.com" などの未解決の名前の先頭にルーティングの種類を追加すると、その配列の各値に対して部分的な一致を実行します。 ルーティングの種類を指定しない場合、 ResolveNames は既定で smtp のルーティングの種類に対応し、プライマリ smtp アドレス プロパティと一致し、複数値配列を検索しません。

1 つの要求で指定できるあいまいな名前は 1 つだけです。 Active Directory が最初に検索され、次にユーザーの連絡先フォルダーが検索されます。 ユーザーの連絡先フォルダーから解決されたエントリには null 以外の ItemId プロパティがあり、GetItem 要求で使用できます。 プライベート配布リストの ID の場合は、 ExpandDL 操作で使用できます。 ReturnFullContactData 属性が true に設定されている場合、ResolveNames 操作で見つかった Active Directory エントリは、連絡先を記述する追加のプロパティを返します。 ReturnFullContactData 属性は、ユーザーの連絡先フォルダーから連絡先とプライベート配布リストに対して返されるデータには影響しません。

ResolveNames 要求の例

説明

次の ResolveNames 要求の例は、User のエントリを解決する方法を示しています。

コード

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns:xsd="http://www.w3.org/2001/XMLSchema"
               xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
               xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
  <soap:Body>
    <ResolveNames xmlns="http://schemas.microsoft.com/exchange/services/2006/messages"
                  xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"
                  ReturnFullContactData="true">
      <UnresolvedEntry>User2</UnresolvedEntry>
    </ResolveNames>
  </soap:Body>
</soap:Envelope>

Comments

この要求に対する応答は、"Jo" または "Mi" で始まるすべてのエントリを返します。返されるアイテムは、パブリック メールボックス、パブリックおよびプライベート配布リスト、および連絡先です。

注:

既定の個人用連絡先フォルダー内の連絡先のみが検索されます。

ResolveNames 要求で考えられる結果を次に示します。

  • 解決されたエンティティを含まない応答は、Error と等しい ResponseClass 属性値を返 しますMessageText 要素には、"結果が見つかりません" が含まれます

  • 解決された 1 つのエンティティを含む応答は、Success と等しい ResponseClass 属性値を返 します

  • 複数の可能なエンティティを含む応答は、Warning と等しい ResponseClass 属性値を返します。 この場合、エンティティを一意の ID に解決できませんでした。 MessageText 要素には、"複数の結果が見つかりました" が含まれます。

要求要素

要求では、次の要素が使用されます。

ResolveNames 操作の成功応答の例

説明

次の例は、 ResolveNames 要求に対する正常な応答を示しています。

コード

<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
               xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <soap:Header>
    <t:ServerVersionInfo MajorVersion="8" MinorVersion="0" MajorBuildNumber="685" MinorBuildNumber="8" 
                         xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" />
  </soap:Header>
  <soap:Body>
    <ResolveNamesResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" 
                          xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" 
                          xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
      <m:ResponseMessages>
        <m:ResolveNamesResponseMessage ResponseClass="Success">
          <m:ResponseCode>NoError</m:ResponseCode>
          <m:ResolutionSet TotalItemsInView="1" IncludesLastItemInRange="true">
            <t:Resolution>
              <t:Mailbox>
                <t:Name>User2</t:Name>
                <t:EmailAddress>User2@example.com</t:EmailAddress>
                <t:RoutingType>SMTP</t:RoutingType>
                <t:MailboxType>Mailbox</t:MailboxType>
              </t:Mailbox>
              <t:Contact>
                <t:DisplayName>User2</t:DisplayName>
                <t:EmailAddresses>
                  <t:Entry Key="EmailAddress1">SMTP:User2@example.com</t:Entry>
                </t:EmailAddresses>
                <t:ContactSource>ActiveDirectory</t:ContactSource>
              </t:Contact>
            </t:Resolution>
          </m:ResolutionSet>
        </m:ResolveNamesResponseMessage>
      </m:ResponseMessages>
    </ResolveNamesResponse>
  </soap:Body>
</soap:Envelope>

ResolveNames 応答要素の成功

応答では、次の要素が使用されます。

ResolveNames 操作エラー応答

説明

次の例は、 ResolveNames 要求に対するエラー応答を示しています。 このエラーは、解決できない名前を解決しようとしたことが原因で発生します。

コード

<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
               xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <soap:Header>
    <t:ServerVersionInfo MajorVersion="8" MinorVersion="0" MajorBuildNumber="685" MinorBuildNumber="8" 
                         xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" />
  </soap:Header>
  <soap:Body>
    <ResolveNamesResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" 
                          xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" 
                          xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
      <m:ResponseMessages>
        <m:ResolveNamesResponseMessage ResponseClass="Error">
          <m:MessageText>No results were found.</m:MessageText>
          <m:ResponseCode>ErrorNameResolutionNoResults</m:ResponseCode>
          <m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>
        </m:ResolveNamesResponseMessage>
      </m:ResponseMessages>
    </ResolveNamesResponse>
  </soap:Body>
</soap:Envelope>

エラー応答要素

エラー応答では、次の要素が使用されます。

関連項目

ExpandDL 操作

名前解決の使用