2.2.2.3 EndSession

A client MUST attach an <EndSession> header to a DSML SOAP message in order to instruct the server to terminate the specified session after the <dsml:batchRequest> payload has been processed in the context of the session.

The client specifies the <EndSession> header as follows:

  • The "urn:schema-microsoft-com:activedirectory:dsmlv2" XML namespace MUST be specified.<4>

  • The soap:mustUnderstand attribute MUST be set to 1.

The following XML shows an <EndSession> header and a <dsml:batchRequest> payload in a SOAP message.

[SOAP]

 <soap:Envelope>
   <soap:Header>
     <ad:EndSession xmlns:ad="urn:schema-microsoft-com:activedirectory:dsmlv2"
       ad:SessionID="sessionId" soap:mustUnderstand="1" />
   </soap:Header>
   <soap:Body>
     <dsml:batchRequest>
       DSML payload
     </dsml:batchRequest>
   </soap:Body>
 </soap:Envelope>

In the preceding script, sessionId MUST be an identifier that was returned from the server in a previously received <Session> header. It is of type sessionId (section 2.2.5.1).