Enabling Outlook Web Access (OWA) Conditional Access features for use with an Azure AD Conditional Access policy targeting Office 365 (Exchange Online) with App Enforced Restrictions.

PS PROPERTY DESCRIPTION
Off No conditional access policy is applied to Outlook on the web. This is the default value.
ReadOnly Users can’t download attachments to their local computer, and can’t enable Offline Mode on non-compliant computers. They can still view attachments in the browser.
ReadOnlyPlusAttachmentsBlocked All restrictions from ReadOnly apply, but users can’t view attachments in the browser.

PowerShell Code

Note: This code requires the Exchange Online Management module.

Updated: