What's New in Exchange Server 2007 SP1 Extensibility

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Topic Last Modified: 2007-11-07

By Ray Dixon, Programming Writer, and Michael Mainer, Programming Writer

Ch-ch-changes! They are a comin'. Microsoft Exchange Server 2007 Service Pack 1 (SP1) includes some changes that affect developers, including updates to transport extensibility, additions to Exchange Web Services, and the ability to customize Microsoft Office Outlook Web Access. To help you develop for Exchange 2007 SP1, this article provides a brief overview of these changes.

Transport Extensibility

Changes to transport extensibility include new types and members that make it easier for you to control the routing of messages in your agents. The following table lists the changes to transport extensibility.

Transport extensibility changes in Exchange 2007 SP1

Type/Member Description

Microsoft.Exchange.Data.Transport.RoutingDomain structure

The RoutingDomain structure represents an Simple Mail Transfer Protocol (SMTP) domain to use when you are overriding the default routing for a recipient of a message.

Microsoft.Exchange.Data.Transport.EnvelopeRecipient.SetRoutingOverride( Microsoft.Exchange.Data.Transport.RoutingDomain ) method

The SetRoutingOverride method sets the RoutingOverride property to the instance of the RoutingDomain structure that is specified.

Microsoft.Exchange.Data.Transport.EnvelopeRecipient.RoutingOverride property

When overridden in a derived class, the RoutingOverride property returns a RoutingDomain structure value that contains the routing destination for the recipient.

Microsoft.Exchange.Data.Transport.MailItem.MustDeliver property

When overridden in a derived class, the MustDeliver property returns a Boolean value that indicates whether the message is marked for special delivery. The property returns true if transport will continue to try to deliver the message until the delivery is successful, and therefore the message will neither expire nor will a non-delivery report (NDR) be generated for the message; otherwise, the property returns false.

Microsoft.Exchange.Data.Transport.MailItem.SetMustDeliver method

The SetMustDelivermethod specifies that the message will remain in queue until it is delivered, without expiring or generating a Non-Delivery Report (NDR). Executing the SetMustDelivermethod sets the value of the MustDeliverproperty to true.

Microsoft.Exchange.Data.Transport.Routing.RoutingAgent.OnResolvedMessage event

The OnResolvedMessageevent occurs after all the recipients of the message have been resolved and before routing is determined.

Microsoft.Exchange.Data.Transport.Routing.ResolvedMessageEventHandler delegate

The OnResolvedMessageEventHandlerdelegate represents the method that will handle the OnResolvedMessageevent of a type that is derived from the RoutingAgentclass.

You can use the additions described in the previous table together in a routing agent to override the default routing for recipients of specific messages. These transport extensibility changes enable you to more precisely control the routing of messages in your agents.

Exchange Web Services

Exchange 2007 SP1 introduces some new additions and changes to the functionality that is exposed by Exchange Web Services, including versioning functionality, access to public folders, support for delegate management, improvements to delegate access, and changes to permissions and identifiers.

Versioning

Exchange 2007 SP1 introduces a new SOAP header element that is used to version SOAP requests. The new SOAP header is required to identify a client as Exchange 2007 SP1–compliant. The following example shows the RequestServerVersion SOAP header.

<soap:Header>
  <t:RequestServerVersion Version="Exchange2007_SP1"/>
</soap:Header>

The RequestServerVersion SOAP header is set on the ExchangeServiceBinding object that is auto-generated by using wsdl.exe. The following example shows you how to set the version by using the auto-generated proxy:

ExchangeServiceBinding esb = new ExchangeServiceBinding();
esb.RequestServerVersionValue = new RequestServerVersion();
esb.RequestServerVersionValue.Version = ExchangeVersionType.Exchange2007_SP1;

Public Folder Access

Exchange 2007 SP1 adds access to public folders. Exchange Web Services in Exchange 2007 SP1 includes the following functionality:

  • Access to the public folder hierarchy.
  • Access to detailed information about public folders.
  • Access to detailed information about public folder items.
  • The ability to create post items.
  • Public folder items synchronization.
  • Subscription notifications for public folders.

The following example shows you how to search the public folders root.

// Create the request.
FindFolderType request = new FindFolderType();

// Search the public folder root.
request.ParentFolderIds = new DistinguishedFolderIdType[1];
request.ParentFolderIds[0] = new DistinguishedFolderIdType();
(request.ParentFolderIds[0] as DistinguishedFolderIdType).Id = DistinguishedFolderIdNameType.publicfoldersroot;

// Return all the immediate child public folders in the public folder root.
request.Traversal = FolderQueryTraversalType.Shallow;

// Request the default properties.
request.FolderShape = new FolderResponseShapeType();
request.FolderShape.BaseShape = DefaultShapeNamesType.Default;

// Send the request and get the response.
FindFolderResponseType response = esb.FindFolder(request);

Delegate Management

Delegate management is already available in MAPI, Microsoft Office Outlook, and the Exchange Management Shell. Support for delegate management is included in Exchange Web Services in Exchange 2007 SP1. This includes the ability to do the following:

  • Add new delegates
  • Retrieve and update existing delegate permissions
  • Remove existing delegates

Improved Delegate Access

Exchange 2007 SP1 introduces the following improvements to Exchange Web Services delegate access:

  • Delegates can open the folders of a principal and manipulate items based on folder-level permissions.
  • Delegates can create and send meeting messages on behalf of the principal.
  • Delegates can receive meeting messages that are forwarded by the principal and respond to them for the principal.
  • Users who have owner rights on a shared mailbox can open the mailbox and act as the owner.
  • Delegates can create notification subscriptions on folders in the mailbox of the principal.

Folder-Level Permissions

Exchange 2007 SP1 introduces access to Exchange Web Services folder-level permissions. This includes the following functionality:

  • Clients can query and configure the sharing of permissions on the folder.
  • Clients can retrieve the effective rights to get the effective permission for the logon user.
  • Free/busy calendar folder permissions are exposed.

Identifier Translation

Exchange 2007 SP1 includes a new method for converting different item identifiers. This method supports public folders, mailbox folders, and item identifiers. The following are the supported identifier formats:

  • The initial release of Exchange 2007 Exchange Web Services identifiers. These are the identifiers that Exchange Web Services creates and consumes for folders and items in Exchange 2007.
  • Exchange Web Services SP1 identifiers. These are the identifiers that Exchange Web Services creates and consumes for folders and items in Exchange 2007 SP1. The identifier format is different in Exchange 2007 SP1.
  • EntryID identifiers. These are provided by MAPI components.
  • Outlook Web Access identifiers. These are the identifiers that are created by Outlook Web Access and offered to consumers in the query string of the Outlook Web Access URL.
  • Availability Calendar ID identifiers. These identifiers are hexadecimal-encoded entry IDs that are used by the Availability feature to represent calendar items in a GetUserAvailability response.

The SOAP body that contains the XML message for converting identifiers is fairly straightforward. The following example shows the XML that is used in a request to convert an Outlook Web Access identifier to an Exchange Web Services identifier.

<ConvertId xmlns="https://schemas.microsoft.com/exchange/services/2006/messages"
           xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"
           DestinationFormat="EwsId">
  <SourceIds>
    <t:AlternateId Format="OwaId" Id="AAMkAGZhN2IxYTA0LWNiNzItN="
                   Mailbox="user1@example.com"/>
  </SourceIds>

The following is an example of the autogenerated proxy objects that are used to generate the XML that is sent to the Exchange server. This example shows the conversion of an Outlook Web Access identifier to a MAPI PR_ENTRYID identifier.

// Create a request to convert identifiers.
ConvertIdType request = new ConvertIdType();
request.SourceIds = new AlternateIdType[1];
request.SourceIds[0] = new AlternateIdType();

// Convert from the Outlook Web Access identifier format to an PR_ENTRYID identifier.
request.SourceIds[0].Format = IdFormatType.OwaId;
 (request.SourceIds[0] as AlternateIdType).Id = "RgAAAAAS2%";
 (request.SourceIds[0] as AlternateIdType).Mailbox = "User1@example.com";
request.DestinationFormat = IdFormatType.EntryId;

New Identifier Format

The Exchange Web Services identifiers for folders and items in Exchange 2007 SP1 differ from the identifiers in the initial release of Exchange 2007. In Exchange 2007, the primary SMTP address is embedded in the identifier format. Because primary SMTP addresses can change, identifiers that are cached on a client will not match identifiers of items on the server if the primary SMTP address is updated, and attempts to reference the item will fail. In Exchange 2007 SP1, the identifiers encode a mailbox identifier instead of the primary SMTP address to uniquely identify the item or folder.

If an Exchange 2007 client sends requests against a computer that is running Exchange 2007 SP1, the identifier will work unless the SMTP address has changed. If the SMTP address has changed, the Exchange 2007 client must resynchronize.

Outlook Web Access Customization

Outlook Web Access provides a rich Web-based environment for accessing a user's mailbox, including e-mail, calendar, contacts, and so on. Exchange 2007 SP1 provides some important Outlook Web Access customization features, including the ability to do the following:

  • Add custom forms
  • Integrate other applications through navigation pane links
  • Add items to the New drop-down menu

For more information about how to customize Outlook Web Access, see Introduction to Outlook Web Access Customization.