GetImItems 操作

GetImItems EWS 操作に関する情報を確認します。

GetImItems 操作は、インスタント メッセージング (IM) グループと IM 連絡先ペルソナに関する情報を取得します。

この操作は Exchange Server 2013 で導入されました。

GetImItems 操作の使用

GetImItems 操作は、グループと連絡先アイテムの識別子を受け入れ、グループと連絡先に関する一連の情報を返します。 応答で返されるプロパティ セットは、拡張プロパティ、複数の連絡先識別子、グループ識別子、拡張プロパティ定義によって引数として識別されます。

GetImItems 操作 SOAP ヘッダー

GetImItems 操作では、次の表に示す SOAP ヘッダーを使用できます。

ヘッダー名 要素 説明
偽装
ExchangeImpersonation
クライアント アプリケーションが偽装しているユーザーを識別します。 このヘッダーは要求に適用されます。
MailboxCulture
MailboxCulture
RFC 3066 で定義されている "言語の識別用タグ" で定義されているカルチャを識別し、メールボックスにアクセスするために使用します。 このヘッダーは要求に適用されます。
RequestVersion
RequestServerVersion
操作要求のスキーマ バージョンを識別します。 このヘッダーは要求に適用されます。
ServerVersion
ServerVersionInfo
要求に応答したサーバーのバージョンを識別します。 このヘッダーは、応答に適用できます。

GetImItems 操作要求の例: IM 連絡先とグループに関する詳細情報を取得する

次の GetImItems 操作要求の例は、IM 連絡先とグループに関する詳細情報を要求する方法を示しています。 GetImItems 操作では、1 つ以上の連絡先またはグループの詳細を要求できます。 拡張プロパティを使用して、グループと連絡先のカスタム プロパティを取得することもできます。 要求された拡張プロパティが項目に存在しない場合、応答は要求されたプロパティを無視し、既定のプロパティ セットの応答を返します。 この例では、拡張プロパティを使用して表示名を取得する方法を示します。

注:

この記事のすべての項目識別子と変更キーは、読みやすくするために短縮されています。 変更キーは、この操作のサービスによって無視されることに注意してください。

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
               xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"
               xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages">
   <soap:Header>
      <t:RequestServerVersion Version="Exchange2013" />
      <t:MailboxCulture>en-US</t:MailboxCulture>
   </soap:Header>
   <soap:Body >
      <m:GetImItems>
         <m:ContactIds>
            <t:ItemId Id="AAMkADEzOTExYACABmEhpSAAA=" ChangeKey="EQAAABBmNDjF"/>
         </m:ContactIds>
         <m:GroupIds>
            <t:ItemId Id="AAMkADEzOTExYjJkBY7+0EAAA=" ChangeKey="EgAAAA=="/>
         </m:GroupIds>         
         <m:ExtendedProperties>
            <t:ExtendedProperty PropertyTag="0x3001" PropertyType="String"/>
         </m:ExtendedProperties>
      </m:GetImItems>
   </soap:Body>
</soap:Envelope>

要求 SOAP 本文には、次の要素が含まれています。

GetImItems 操作の応答に成功しました

次の例は、IM 連絡先とグループを 取得するための GetImItems 要求に対する正常な応答を示しています。 表示名は拡張プロパティで要求されます。 IM 連絡先はペルソナの形式で返されます。

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Header>
      <h:ServerVersionInfo MajorVersion="15" 
                           MinorVersion="0" 
                           MajorBuildNumber="556" 
                           MinorBuildNumber="8" 
                           Version="Exchange2013" 
                           xmlns:h="https://schemas.microsoft.com/exchange/services/2006/types" 
                           xmlns="https://schemas.microsoft.com/exchange/services/2006/types" 
                           xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
                           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
   </s:Header>
   <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
           xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <GetImItemsResponse ResponseClass="Success" 
                          xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">
         <ResponseCode>NoError</ResponseCode>
         <ImItemList>
            <Groups xmlns="https://schemas.microsoft.com/exchange/services/2006/types">
               <ImGroup>
                  <DisplayName>Exchange SDK Team</DisplayName>
                  <GroupType>IPM.DistList.MOC.UserGroup</GroupType>
                  <ExchangeStoreId Id="AAMkADEzQrAABY7+0EAAA=" ChangeKey="EgAAAA=="/>
                  <MemberCorrelationKey>
                     <ItemId Id="AAMkADEzOTExYjeGgGqm4QrAABmEhpSAAA=" ChangeKey="EQAAAA=="/>
                  </MemberCorrelationKey>
                  <ExtendedProperties>
                     <ExtendedProperty>
                        <ExtendedFieldURI PropertyTag="0x3001" PropertyType="String"/>
                        <Value>Exchange SDK Team</Value>
                     </ExtendedProperty>
                  </ExtendedProperties>
               </ImGroup>
            </Groups>
            <Personas xmlns="https://schemas.microsoft.com/exchange/services/2006/types">
               <Persona>
                  <PersonaId Id="AAQkADEzOTBZImBzN5J/uHXc="/>
                  <PersonaType>Person</PersonaType>
                  <CreationTime>2012-11-07T00:10:35Z</CreationTime>
                  <DisplayName>Tony Smith</DisplayName>
                  <DisplayNameFirstLast>Tony Smith</DisplayNameFirstLast>
                  <DisplayNameLastFirst>Tony Smith</DisplayNameLastFirst>
                  <FileAs/>
                  <FileAsId>None</FileAsId>
                  <ImAddress>tsmith@contoso.com</ImAddress>
                  <RelevanceScore>2147483647</RelevanceScore>
                  <Attributions>
                     <Attribution>
                        <Id>0</Id>
                        <SourceId Id="AAMkADEzhQaoeGgGqm4QrAABmEhpSAAA=" ChangeKey="EQArAABmNDjF"/>
                        <DisplayName>Lync Contacts</DisplayName>
                        <IsWritable>false</IsWritable>
                        <IsQuickContact>true</IsQuickContact>
                        <IsHidden>false</IsHidden>
                     </Attribution>
                  </Attributions>
                  <DisplayNames>
                     <StringAttributedValue>
                        <Value>Tony Smith</Value>
                        <Attributions>
                           <Attribution>0</Attribution>
                        </Attributions>
                     </StringAttributedValue>
                  </DisplayNames>
                  <FileAsIds>
                     <StringAttributedValue>
                        <Value>None</Value>
                        <Attributions>
                           <Attribution>0</Attribution>
                        </Attributions>
                     </StringAttributedValue>
                  </FileAsIds>
                  <ImAddresses>
                     <StringAttributedValue>
                        <Value>tsmith@contoso.com</Value>
                        <Attributions>
                           <Attribution>0</Attribution>
                        </Attributions>
                     </StringAttributedValue>
                  </ImAddresses>
                  <ExtendedProperties>
                     <ExtendedPropertyAttributedValue>
                        <Value>
                           <ExtendedFieldURI PropertyTag="0x3001" PropertyType="String"/>
                           <Value>Tony Smith</Value>
                        </Value>
                        <Attributions>
                           <Attribution>0</Attribution>
                        </Attributions>
                     </ExtendedPropertyAttributedValue>
                  </ExtendedProperties>
               </Persona>
            </Personas>
         </ImItemList>
      </GetImItemsResponse>
   </s:Body>
</s:Envelope>

応答 SOAP 本文には、次の要素が含まれています。

GetImItems 操作エラー応答

GetImItems 操作は識別子を検証せず、無効な連絡先またはグループ識別子がサービスに提供されている場合、予期される ErrorInvalidImContactId または ErrorInvalidImGroupId エラー応答を返しません。

関連項目