Opération de GetSharingMetadataGetSharingMetadata operation

L’opération GetSharingMetadata obtient un jeton d’authentification opaque qui identifie une invitation de partage.The GetSharingMetadata operation gets an opaque authentication token that identifies a sharing invitation.

En-têtes SOAPSOAP Headers

L’opération GetSharingMetadata peut utiliser les en-têtes SOAP répertoriés et décrits dans le tableau suivant.The GetSharingMetadata operation can use the SOAP headers that are listed and described in the following table.

HeaderHeader ÉlémentElement DescriptionDescription
RequestVersionRequestVersion
RequestServerVersionRequestServerVersion
Identifie la version de schéma de la demande d’opération.Identifies the schema version for the operation request.
ServerVersionServerVersion
ServerVersionInfoServerVersionInfo
Identifie la version du serveur qui a répondu à la demande.Identifies the version of the server that responded to the request.

Exemple de requête GetSharingMetadataGetSharingMetadata request example

DescriptionDescription

L’exemple suivant montre comment créer une demande pour obtenir un jeton d’authentification opaque qui identifie une invitation de partage.The following example shows how to form a request to get an opaque authentication token that identifies a sharing invitation. Dans cet exemple, user1@contoso.com souhaite partager le dossier spécifié par l’élément IdOfFolderToShare avec user1@fabikam.com et User2@test.com.In this example, user1@contoso.com wants to share the folder that is specified by the IdOfFolderToShare element with user1@fabikam.com and user2@test.com.

CodeCode

<?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"
               xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"
               xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">
  <soap:Header>
    <t:RequestServerVersion Version="Exchange2010"/>
  </soap:Header>
  <soap:Body>
    <m:GetSharingMetadata>
      <m:IdOfFolderToShare Id="AAMkAD=" ChangeKey="AwAAA=" />
      <m:SenderSmtpAddress>user1@contoso.com</m:SenderSmtpAddress>
      <m:Recipients>
        <t:SmtpAddress>user1@fabrikam.com</t:SmtpAddress>
        <t:SmtpAddress>user2@test.com</t:SmtpAddress>
      </m:Recipients>
    </m:GetSharingMetadata>
  </soap:Body>
</soap:Envelope>

CommentairesComments

L’élément Recipients (ArrayOfSmtpAddressType) contient un élément SmtpAddress pour chaque destinataire prévu de l’invitation de partage.The Recipients (ArrayOfSmtpAddressType) element contains one SmtpAddress element for each intended recipient of the sharing invitation.

Réponse GetSharingMetadata réussieSuccessful GetSharingMetadata Response

DescriptionDescription

L’exemple suivant montre une réponse réussie à une demande GetSharingMetadata .The following example shows a successful response to a GetSharingMetadata request. Dans cet exemple, deux destinataires ont été spécifiés dans la requête GetSharingMetadata correspondante : user1@fabrikam.com et User2@test.com.In this example, two recipients were specified in the corresponding GetSharingMetadata request: user1@fabrikam.com and user2@test.com.

CodeCode

<?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="14" 
                         MinorVersion="0" 
                         MajorBuildNumber="639" 
                         MinorBuildNumber="11" 
                         Version="Exchange2010" 
                         xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />
  </soap:Header>
  <soap:Body>
    <GetSharingMetadataResponseMessage ResponseClass="Success" 
                                xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"
                                xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"
                                xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">
      <m:ResponseCode>NoError</ResponseCode>
      <m:EncryptedSharedFolderDataCollection>
        <t:EncryptedSharedFolderData>
          <t:Token>
            <EncryptedData Id="Assertion0" Type="http://www.w3.org/2001/04/xmlenc#Element" xmlns="http://www.w3.org/2001/04/xmlenc#">
              <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"></EncryptionMethod>
              <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
                <EncryptedKey>
                  <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"></EncryptionMethod>
                  <ds:KeyInfo Id="keyinfo">
                    <wsse:SecurityTokenReference xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
                      <wsse:KeyIdentifier 
                                  EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" 
                                  ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509SubjectKeyIdentifier">
                        B4VEEAf=
                      </wsse:KeyIdentifier>
                    </wsse:SecurityTokenReference>
                  </ds:KeyInfo>
                  <CipherData>
                    <CipherValue>GI/Dxqvw2na==</CipherValue>
                  </CipherData>
                </EncryptedKey>
              </ds:KeyInfo>
              <CipherData>
                <CipherValue>L77I7Hr06z</CipherValue>
              </CipherData>
            </EncryptedData>
          </t:Token>
          <t:Data>
            <EncryptedData Type="http://www.w3.org/2001/04/xmlenc#Element" xmlns="http://www.w3.org/2001/04/xmlenc#">
              <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes256-cbc" />
              <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
                <EncryptedKey xmlns="http://www.w3.org/2001/04/xmlenc#">
                  <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#kw-tripledes" />
                  <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
                    <KeyName>key</KeyName>
                  </KeyInfo>
                  <CipherData>
                    <CipherValue>9UgtjrHiU</CipherValue>
                  </CipherData>
                </EncryptedKey>
              </KeyInfo>
              <CipherData>
                <CipherValue>NCNsJoGtQ==</CipherValue>
              </CipherData>
            </EncryptedData>
          </t:Data>
        </t:EncryptedSharedFolderData>
      </m:EncryptedSharedFolderDataCollection>
      <m:InvalidRecipients>
        <t:InvalidRecipient>
          <t:SmtpAddress>user2@test.com</t:SmtpAddress>
          <t:ResponseCode>RecipientOrganizationNotFederated</t:ResponseCode>
          <m:MessageText>The organization of these recipients is not federated for external sharing.</m:MessageText>
        </t:InvalidRecipient>
      </m:InvalidRecipients>
    </GetSharingMetadataResponseMessage>
  </soap:Body>
</soap:Envelope>

CommentairesComments

La réponse contient un élément EncryptedSharedFolderData pour chaque organisation représentée par des destinataires valides qui sont spécifiés dans la demande GetSharingMetadata .The response contains one EncryptedSharedFolderData element for each organization that is represented by valid recipients that are specified in the GetSharingMetadata request.

La demande GetSharingMetadata réussit même si des destinataires non valides sont spécifiés dans la demande.The GetSharingMetadata request will succeed even if invalid recipients are specified in the request. L’élément InvalidRecipients contient des informations sur les destinataires non valides.The InvalidRecipients element contains information about invalid recipients. Pour plus d’informations sur les raisons pour lesquelles un destinataire peut être non valide, voir ResponseCode (InvalidRecipientResponseCodeType).For information about the reasons why a recipient might be invalid, see ResponseCode (InvalidRecipientResponseCodeType).

Si tous les destinataires prévus ne sont pas valides, l’élément EncryptedSharedFolderDataCollection est vide.If all intended recipients are invalid, the EncryptedSharedFolderDataCollection element will be empty.

Réponse d’erreur GetSharingMetadataGetSharingMetadata error response

DescriptionDescription

L’exemple suivant montre une réponse d’erreur à une requête GetSharingMetadata .The following example shows an error response to a GetSharingMetadata request.

CodeCode

<?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="14" 
                         MinorVersion="0" 
                         MajorBuildNumber="639" 
                         MinorBuildNumber="11" 
                         Version="Exchange2010" 
                         xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />
  </soap:Header>
  <soap:Body>
    <GetSharingMetadataResponseMessage ResponseClass="Error" 
                                xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"
                                xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"
                                xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">
      <m:MessageText>The SMTP address format is invalid.</MessageText>
      <m:ResponseCode>ErrorInvalidSmtpAddress</ResponseCode>
      <m:DescriptiveLinkKey>0</DescriptiveLinkKey>
    </GetSharingMetadataResponseMessage>
  </soap:Body>
</soap:Envelope>

Voir aussiSee also

GetSharingMetadataGetSharingMetadata

GetSharingMetadataTypeGetSharingMetadataType

GetSharingMetadataResponseMessageGetSharingMetadataResponseMessage

GetSharingMetadataResponseMessageTypeGetSharingMetadataResponseMessageType

Opérations EWS dans ExchangeEWS operations in Exchange