Messages sent
from a dynamic send port with transport type set to one of the Office 365 Outlook
adapters require the UserTokenIdentifier context property. The listed steps are followed to obtain the UserTokenIdentifier:
- Create a static send port for each of the Office 365
Outlook transport types to be used in the dynamic send port (Mail,
Calendar, Contact).
- Export the bindings.
- In the bindings file, look for the UserTokenIdentifier
property for the static send port(s) created in step 2.
- In the BizTalk message to be sent, use the value from
step 3 to set the Office<TransportName>.UserTokenIdentifier
context property where <TransportName> is Mail/Calendar/Contact
depending on the transport type of the message.
Example:
A BizTalk message to be sent via a dynamic send port "SendPort" can be created from
an incoming message "ReceivedMessage" with the expression shapes as shown below:
For Mail transport:
XMLMessage = new System.Xml.XmlDocument();
XMLMessage(OfficeMail.UserTokenIdentifier)
= <value of UserTokenIdentifier>;
SendPort(Microsoft.XLANGs.BaseTypes.TransportType)
= "Office365 Outlook Email";
For Calendar transport:
XMLMessage
= new System.Xml.XmlDocument();
XMLMessage(OfficeCalendar.UserTokenIdentifier)
= <value of UserTokenIdentifier>;
SendPort(Microsoft.XLANGs.BaseTypes.TransportType)
= "Office365 Outlook Calendar";
For Contact transport:
XMLMessage
= new System.Xml.XmlDocument();
XMLMessage(OfficeContact.UserTokenIdentifier)
= <value of UserTokenIdentifier>;
SendPort(Microsoft.XLANGs.BaseTypes.TransportType)
= "Office365 Outlook Contact";