%3CLINGO-SUB%20id%3D%22lingo-sub-1209763%22%20slang%3D%22en-US%22%3EFiltering%20in%20Office%20365%20Outlook%20Adapters%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1209763%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20title%3D%22Office%20365%20Outlook%20adapters%22%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fbiztalk%2Fcore%2Foffice365-adapters%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%3CSPAN%20data-contrast%3D%22auto%22%3EOffice%20365%20Outlook%20adapters%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%20are%20introduced%20in%20BizTalk%20Server%202020%20and%20qualified%20customers%20got%20access%20to%20many%20of%20its%20capabilities%20in%20BizTalk%20Server%202016%20%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22auto%22%3EFeature%20Pack%203%20to%20provide%20support%20for%20a%20variety%20of%20Office%20365%20integration%20scenarios%20based%20on%20email%2C%20calendar%20or%20contacts.%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22auto%22%3EWith%20these%20adapters%2C%20users%20can%3A%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%20data-aria-posinset%3D%221%22%20data-aria-level%3D%222%22%3E%3CSPAN%20data-contrast%3D%22auto%22%3ESync%20with%20any%20Office%20365%20Outlook%20email%20account%20or%20calendar.%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%20data-aria-posinset%3D%222%22%20data-aria-level%3D%222%22%3E%3CSPAN%20data-contrast%3D%22auto%22%3ESend%20emails%2C%20meeting%20requests%20or%20contacts%20from%20an%20Office%20365%20account.%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%20%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22auto%22%3EIn%20this%20article%20we%20focus%20on%20the%20built-in%20filtering%20functionality%20provided%20in%20the%20transport%20properties%20configuration%20of%20Office%20365%20Email%20and%20Calendar%20receive%20locations.%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CH4%20id%3D%22toc-hId--686497591%22%20id%3D%22toc-hId--686497591%22%3EFiltering%20Outlook%20items%20by%20their%20location%20on%20the%20Office%20365%20server%26nbsp%3B%3C%2FH4%3E%0A%3CP%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22auto%22%3EBy%20default%2C%20a%20receive%20location%20with%20transport%20type%3C%2FSPAN%3E%20%3CA%20title%3D%22Office%20365%20Outlook%20Email%20adapter%22%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fbiztalk%2Fcore%2Foffice365-mail-adapter%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EOffice%20365%20Outlook%20Email%3C%2FA%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%20will%20listen%20to%20the%20Inbox%20folder.%20However%2C%20any%20other%20folder%20available%20on%20the%20Office%20365%20mail%20server%20can%20be%20selected.%26nbsp%3B%20A%20typical%20scenario%20would%20be%20when%20emails%20are%20sorted%20into%20specific%20folders%20via%20%3C%2FSPAN%3E%3CA%20title%3D%22server-side%20rules%22%20href%3D%22https%3A%2F%2Fsupport.office.com%2Fen-us%2Farticle%2Fmanage-email-messages-by-using-rules-c24f5dea-9465-4df4-ad17-a50704d66c59%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%3CSPAN%20data-contrast%3D%22auto%22%3Eserver-side%20rules%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%20data-contrast%3D%22auto%22%3E.%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22auto%22%3ESimilarly%2C%20in%20the%20%3C%2FSPAN%3E%3CA%20title%3D%22Office365%20Outlook%20Calendar%20adapter%22%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fbiztalk%2Fcore%2Foffice365-calendar-adapter%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EOffice365%20Outlook%20Calendar%20adapter%3C%2FA%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%2C%20the%20default%20calendar%20is%20%22Calendar%22%2C%26nbsp%3B%20but%20any%20other%20calendar%20can%20be%20selected.%20This%20would%20be%20applicable%20for%20instance%20when%20an%20organization%20has%20several%20%3C%2FSPAN%3E%3CA%20title%3D%22shared%20calendars%22%20href%3D%22https%3A%2F%2Fsupport.office.com%2Fen-us%2Farticle%2Fcalendar-sharing-in-office-365-b576ecc3-0945-4d75-85f1-5efafb8a37b4%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%3CSPAN%20data-contrast%3D%22auto%22%3Eshared%20calendars%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%2C%20or%20several%20calendars%20as%20part%20of%20its%20business%20workflow.%20Another%20scenario%20could%20be%20when%20multiple%20calendars%20need%20to%20be%20merged%20into%20a%20unified%20view%2C%20which%20can%20be%20achieved%20by%20creating%20one%20receive%20location%20per%20calendar%20and%20subscribing%20to%20these%20locations.%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22auto%22%3EThe%20UI%20for%20configuring%20folders%20and%20calendars%20is%20shown%20below.%20The%20tree%20views%20are%20always%20up%20to%20date%20and%20reflect%20the%20hierarchy%20of%20these%20destinations%20in%20the%20Office%20365%20account%20on%20the%20server%20side.%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CH5%20id%3D%22toc-hId-4063883%22%20id%3D%22toc-hId-4063883%22%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FH5%3E%0A%3CTABLE%20class%3D%22lia-align-left%22%20style%3D%22width%3A%20100%25%3B%22%20border%3D%221%22%20width%3D%22100%25%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2250%25%22%3E%3CH5%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%20id%3D%22toc-hId--1803390580%22%20id%3D%22toc-hId--1803390580%22%3E%3CSTRONG%3ETransport%20properties%20for%20Email%20receive%20location%3C%2FSTRONG%3E%3C%2FH5%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2250%25%22%3E%3CH5%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%20id%3D%22toc-hId-684122253%22%20id%3D%22toc-hId-684122253%22%3E%3CSTRONG%3ETransport%20properties%20for%20Calendar%20receive%20location%3C%2FSTRONG%3E%3C%2FH5%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2250%25%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Untitled%20picture.png%22%20style%3D%22width%3A%20390px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F175191i420E8208A6F68319%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Untitled%20picture.png%22%20alt%3D%22Untitled%20picture.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FTD%3E%0A%3CTD%20width%3D%2250%25%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Untitled%20picture2.png%22%20style%3D%22width%3A%20398px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F175194i25E05BA35289E040%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Untitled%20picture2.png%22%20alt%3D%22Untitled%20picture2.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22auto%22%3EThe%20%3C%2FSPAN%3E%3CA%20title%3D%22Office%20365%20Outlook%20Calendar%20adapter%22%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fbiztalk%2Fcore%2Foffice365-calendar-adapter%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EOffice%20365%20Outlook%20Calendar%20adapter%3C%2FA%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%20also%20provides%20calendar%20selection%20on%20the%20%3C%2FSPAN%3E%3CI%3E%3CSPAN%20data-contrast%3D%22auto%22%3Esend%20side%3C%2FSPAN%3E%3C%2FI%3E%3CSPAN%20data-contrast%3D%22auto%22%3E.%20So%2C%20back%20to%20the%20above-mentioned%20calendar%20consolidation%2C%20one%20could%20have%20a%20send%20port%20pointing%20to%20a%20user-created%20calendar%20and%20listening%20to%20several%20calendars%20on%20the%20receive%20side.%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CH4%20id%3D%22toc-hId-673619149%22%20id%3D%22toc-hId-673619149%22%3EFiltering%20Outlook%20items%20by%20date%26nbsp%3B%3C%2FH4%3E%0A%3CP%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22auto%22%3EIn%20the%20configuration%20of%20a%20location%20with%20Email%20transport%20type%2C%20the%20%22%3C%2FSPAN%3E%3CI%3E%3CSPAN%20data-contrast%3D%22auto%22%3EStart%20from%3C%2FSPAN%3E%3C%2FI%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%3A%22%20field%20is%20used%20to%20filter%20emails%20by%20timestamp%2C%20i.e.%20time%20received%20on%20the%20Office%20365%20server.%20A%20field%20value%20set%20in%20the%20past%20will%20limit%20how%20far%20back%20emails%20should%20be%20fetched.%20Setting%20the%20date%20far%20enough%20in%20the%20past%20can%20be%20used%20to%20backup%20all%20emails%20contained%20in%20the%20folder%20server-side.%20Conversely%2C%20setting%20a%20date%20in%20the%20future%20can%20be%20used%20to%20start%20fetching%20emails%20after%20a%20certain%20date.%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Untitled%20picture3.png%22%20style%3D%22width%3A%20389px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F175196iCF601F2A7DCC366C%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Untitled%20picture3.png%22%20alt%3D%22Untitled%20picture3.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22auto%22%3EIn%20the%20case%20of%20emails%2C%20filtering%20by%20mail%20timestamp%20is%20pretty%20straightforward.%20Less%20so%20in%20the%20case%20of%20calendar%20events.%20In%20the%20Calendar%20adapter%2C%20the%20date%20filtering%20is%20based%20on%20the%20%3C%2FSPAN%3E%3CI%3E%3CSPAN%20data-contrast%3D%22auto%22%3Estart%20datetime%20of%20an%20event%3C%2FSPAN%3E%3C%2FI%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%2C%20which%20must%20fall%20within%20a%20pre-set%20%22time%20horizon%22%20(screenshot%20below).%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Untitled%20picture4.png%22%20style%3D%22width%3A%20409px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F175197i91BFFCEC03E90C84%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Untitled%20picture4.png%22%20alt%3D%22Untitled%20picture4.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3E%3CFONT%20size%3D%224%22%3EIt%20is%20easier%20to%20understand%20by%20looking%20under%20the%20hood%3A%20The%20Calendar%20adapter%20constantly%20polls%20the%20Office%20365%20server%20every%20minute%20to%20retrieve%20the%20most%20recent%20set%20of%20events%20starting%20between%20when%20the%20polling%20happens%2C%20and%20that%20time%20plus%20the%20time%20horizon.%20So%20for%20instance%2C%20if%20the%20adapter%20polls%20at%203pm%20and%20the%20time%20horizon%20is%20set%20to%202%20hours%2C%20a%20new%20BizTalk%20message%20will%20be%20created%20for%20each%20new%20calendar%20event%20found%20that%20starts%20between%203pm%20and%205pm.%20Note%20that%20the%20adapter%20polls%20every%20minute%2C%20but%20calendar%20events%20found%20in%20consecutive%20polling%20intervals%20are%20only%20considered%20once%3B%20no%20duplicate%20BizTalk%20message%20gets%20created%20for%20the%20same%20events.%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22auto%22%3EThe%20Calendar%20adapter%20configuration%20has%20built-in%20time%20horizon%20values%20corresponding%20to%20different%20time%20scales%20(minutes%2Fhours%2Fdays%2Fweeks)%20that%20we%20think%20are%20most%20relevant%20to%20business%20processes%20in%20general.%26nbsp%3B%20The%20choice%20of%20a%20value%20really%20depends%20on%20how%20one%20views%20the%20Calendar%20adapter.%20Short%20time%20horizon%20corresponds%20to%20a%20%22get%20the%20events%20that%20are%20about%20to%20start%22%20scenario%2C%20a%20notification%20service%20where%20there%20are%20a%20lot%20of%20events.%20A%20longer%20time%20horizon%20can%20be%20better%20suited%20for%20a%20planning%20type%20of%20business%20process%2C%20or%20could%20correspond%20to%20a%20Lead%20time%20within%20which%20events%20are%20scheduled%20and%20where%20event%20starting%20%22a%20while%20from%20now%22%20need%20to%20be%20published%20as%20soon%20as%20they're%20created%20on%20the%20Office%20365%20server.%20Custom%20values%20are%20not%20currently%20supported%2C%20but%20could%20be%20in%20the%20future%20if%20there%20is%20enough%20demand%20for%20the%20feature.%20The%20minimum%20of%2015%20minutes%20was%20chosen%20as%20a%20reasonable%20BizTalk%20publication%20delay%20under%20heavy%20load%2C%20i.e.%2C%20between%20the%20time%20content%20is%20received%20from%20the%20external%20server%20to%20the%20time%20the%20content%20is%20processed%20and%20through%20the%20Message%20Box%20database.%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CH4%20id%3D%22toc-hId--1133835314%22%20id%3D%22toc-hId--1133835314%22%3EPreventing%20duplication%26nbsp%3B%3C%2FH4%3E%0A%3CP%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22auto%22%3EThe%20Office%20365%20Outlook%20Email%20and%20Calendar%20adapters%20keep%20track%20of%20the%20Outlook%20items%20that%20have%20already%20fetched%20and%20published.%20This%20applies%20even%20after%20a%20receive%20location%20has%20been%20restarted.%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CH4%20id%3D%22toc-hId-1353677519%22%20id%3D%22toc-hId-1353677519%22%3EFiltering%20emails%20by%20read%20status%26nbsp%3B%3C%2FH4%3E%0A%3CP%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22auto%22%3EAn%20Office%20365%20Outlook%20Email%20receive%20location%20can%20be%20configured%20to%20only%20receive%20unread%20mails%20(checkbox%20shown%20below).%20These%20could%20be%20new%20emails%20not%20read%20on%20any%20other%20email%20client%2C%20as%20well%20as%20mails%20that%20are%20changed%20from%20read%20to%20unread.%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Untitled%20picture6.png%22%20style%3D%22width%3A%20386px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F175198iAB1C06E2CF1D8CC7%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Untitled%20picture6.png%22%20alt%3D%22Untitled%20picture6.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3E%3CFONT%20size%3D%224%22%3ENote%20that%20the%20option%20to%20mark%20emails%20as%20read%20is%20available%20in%20the%20transport%20options%20as%20a%20Post%20Action.%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Untitled%20picture7.png%22%20style%3D%22width%3A%20385px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F175189i2F914E5CDFF1C65D%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Untitled%20picture7.png%22%20alt%3D%22Untitled%20picture7.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20id%3D%22toc-hId--453776944%22%20id%3D%22toc-hId--453776944%22%3EFiltering%20email%20payload%26nbsp%3B%3C%2FH4%3E%0A%3CP%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22auto%22%3EStarting%20with%20BizTalk%20Server%202020%2C%20the%20Office%20365%20Outlook%20Email%20adapter%20provides%20the%20option%20to%20choose%20the%20email%20content%20format%2C%20as%20well%20as%20whether%20attachments%20should%20be%20fetched.%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Untitled%20picture8.png%22%20style%3D%22width%3A%20258px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F175186i0AF967D45830B662%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Untitled%20picture8.png%22%20alt%3D%22Untitled%20picture8.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22auto%22%3EOn%20the%20send%20side%2C%20the%20configuration%20of%20an%20send%20port%20also%20gives%20the%20choice%20of%20including%20attachments%2C%20which%20correspond%20to%20the%20parts%20of%20a%20multipart%20BizTalk%20message.%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%26nbsp%3B%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Untitled%20picture9.png%22%20style%3D%22width%3A%20258px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F175188i1EA719B66CBB5C66%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Untitled%20picture9.png%22%20alt%3D%22Untitled%20picture9.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorEmmanuel_Abram-Profeta_7%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CH4%20id%3D%22toc-hId-2033735889%22%20id%3D%22toc-hId-2033735889%22%3EReferences%3A%26nbsp%3B%3C%2FH4%3E%0A%3CUL%3E%0A%3CLI%20data-aria-posinset%3D%221%22%20data-aria-level%3D%221%22%3E%3CA%20title%3D%22Office%20365%20Outlook%20Email%20adapter%22%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fbiztalk%2Fcore%2Foffice365-mail-adapter%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%3CSPAN%20data-contrast%3D%22auto%22%3EOffice%20365%20Outlook%20Email%20adapter%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%20data-aria-posinset%3D%222%22%20data-aria-level%3D%221%22%3E%3CA%20title%3D%22Office%20365%20Outlook%20Calendar%20adapter%22%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fbiztalk%2Fcore%2Foffice365-calendar-adapter%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%3CSPAN%20data-contrast%3D%22auto%22%3EOffice%20365%20Outlook%20Calendar%20adapter%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FA%3E%3C%2FLI%3E%0A%3C%2FUL%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-1209763%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%20data-contrast%3D%22auto%22%3EIn%20this%20article%20we%20focus%20on%20the%20built-in%20filtering%20functionality%20provided%20in%20the%20transport%20properties%20configuration%20of%20Office%20365%20Email%20and%20Calendar%20receive%20locations.%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1209763%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3Ebiztalk%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E

Office 365 Outlook adapters are introduced in BizTalk Server 2020 and qualified customers got access to many of its capabilities in BizTalk Server 2016 Feature Pack 3 to provide support for a variety of Office 365 integration scenarios based on email, calendar or contacts.  

With these adapters, users can: 

  • Sync with any Office 365 Outlook email account or calendar. 
  • Send emails, meeting requests or contacts from an Office 365 account. 

In this article we focus on the built-in filtering functionality provided in the transport properties configuration of Office 365 Email and Calendar receive locations. 

 

Filtering Outlook items by their location on the Office 365 server 

 

By default, a receive location with transport type Office 365 Outlook Email will listen to the Inbox folder. However, any other folder available on the Office 365 mail server can be selected.  A typical scenario would be when emails are sorted into specific folders via server-side rules. 

 

Similarly, in the Office365 Outlook Calendar adapter, the default calendar is "Calendar",  but any other calendar can be selected. This would be applicable for instance when an organization has several shared calendars, or several calendars as part of its business workflow. Another scenario could be when multiple calendars need to be merged into a unified view, which can be achieved by creating one receive location per calendar and subscribing to these locations. 

 

The UI for configuring folders and calendars is shown below. The tree views are always up to date and reflect the hierarchy of these destinations in the Office 365 account on the server side. 

 
Transport properties for Email receive location
Transport properties for Calendar receive location
Untitled picture.png Untitled picture2.png

 

The Office 365 Outlook Calendar adapter also provides calendar selection on the send side. So, back to the above-mentioned calendar consolidation, one could have a send port pointing to a user-created calendar and listening to several calendars on the receive side. 

 

Filtering Outlook items by date 

 

In the configuration of a location with Email transport type, the "Start from:" field is used to filter emails by timestamp, i.e. time received on the Office 365 server. A field value set in the past will limit how far back emails should be fetched. Setting the date far enough in the past can be used to backup all emails contained in the folder server-side. Conversely, setting a date in the future can be used to start fetching emails after a certain date. 

 

Untitled picture3.png

 

In the case of emails, filtering by mail timestamp is pretty straightforward. Less so in the case of calendar events. In the Calendar adapter, the date filtering is based on the start datetime of an event, which must fall within a pre-set "time horizon" (screenshot below).  

 

Untitled picture4.png

 

It is easier to understand by looking under the hood: The Calendar adapter constantly polls the Office 365 server every minute to retrieve the most recent set of events starting between when the polling happens, and that time plus the time horizon. So for instance, if the adapter polls at 3pm and the time horizon is set to 2 hours, a new BizTalk message will be created for each new calendar event found that starts between 3pm and 5pm. Note that the adapter polls every minute, but calendar events found in consecutive polling intervals are only considered once; no duplicate BizTalk message gets created for the same events.

 

The Calendar adapter configuration has built-in time horizon values corresponding to different time scales (minutes/hours/days/weeks) that we think are most relevant to business processes in general.  The choice of a value really depends on how one views the Calendar adapter. Short time horizon corresponds to a "get the events that are about to start" scenario, a notification service where there are a lot of events. A longer time horizon can be better suited for a planning type of business process, or could correspond to a Lead time within which events are scheduled and where event starting "a while from now" need to be published as soon as they're created on the Office 365 server. Custom values are not currently supported, but could be in the future if there is enough demand for the feature. The minimum of 15 minutes was chosen as a reasonable BizTalk publication delay under heavy load, i.e., between the time content is received from the external server to the time the content is processed and through the Message Box database.  

 

Preventing duplication 

 

The Office 365 Outlook Email and Calendar adapters keep track of the Outlook items that have already fetched and published. This applies even after a receive location has been restarted.  

 

Filtering emails by read status 

 

An Office 365 Outlook Email receive location can be configured to only receive unread mails (checkbox shown below). These could be new emails not read on any other email client, as well as mails that are changed from read to unread.  

 

Untitled picture6.png

 

Note that the option to mark emails as read is available in the transport options as a Post Action.

 

Untitled picture7.png

 

Filtering email payload 

 

Starting with BizTalk Server 2020, the Office 365 Outlook Email adapter provides the option to choose the email content format, as well as whether attachments should be fetched.  

 

 Untitled picture8.png

 

On the send side, the configuration of an send port also gives the choice of including attachments, which correspond to the parts of a multipart BizTalk message.  

 

 Untitled picture9.png

 

References: