Skip to content

Outlook 365 — Close

Type: outlook365-close  ·  Package: Outlook 365 v1.0.4  ·  Output: —

Closes an Outlook 365 session and frees its resources. It is only needed when you opened the session with Connect without body.

It works on the session created with Outlook 365 — Connect. Pass it in the session parameter.

If you used Connect with body, the session closes automatically when the block ends and you don’t need this activity. Once closed, the session can no longer be used: any activity that receives it will fail, so close it at the end of your work with the mailbox.

None.

ParameterTypeDefaultDescription
sessionZoanOutlookMailSession—Outlook 365 — Connect session to close. Inside Connect’s body the inherited one is used.

This activity does not return a value.

MessageCause and fix
No Outlook 365 session available. …You didn’t pass session and the activity is not inside Connect’s body. Pass the session variable.
Outlook 365 — Connect credential = credential("m365-support") → output: session
Outlook 365 — Send session = session to = "customer@example.com" subject = "Weekly report"
Outlook 365 — Close session = session