This tip explains how to allow or block file types in OWA for Exchange 2013 and Office 365
With Exchange 2003 we had to make changes to the Registry in order to allow or block particular file types in OWA, and in Exchange 2007 we had to configure OWAs’ virtual directories. Since Exchange 2010 that this is done through Outlook Web App Mailbox Policies and this applies to the latest Exchange 2013 and Exchange Online.
To check which files are currently being blocked, and to change this
if necessary, first connect to your exchange online service via
powershell.
$cred = Get-Credential
$session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $cred -Authentication Basic –AllowRedirection
Import-PSSession $session
After successfully connecting, run the following cmdlet to check what
file types are being blocked:
Get-OwaMailboxPolicy <Policy Name> | Select -ExpandProperty BlockedFileTypes | Sort
If you want to make changes and allow certain file types, such as XML
files for example, you remove the .xml from the BlockedFileTypes and
BlockedMimeTypes lists and add it to the AllowedFileTypes and
AllowedMimeTypes lists:
Get-OwaMailboxPolicy | Set-OwaMailboxPolicy -BlockedFileTypes @{Remove = ".xml"}
Get-OwaMailboxPolicy | Set-OwaMailboxPolicy -AllowedFileTypes @{Add = ".xml"}
Get-OwaMailboxPolicy | Set-OwaMailboxPolicy -BlockedMimeTypes @{Remove = "text/xml", "application/xml"}
Get-OwaMailboxPolicy | Set-OwaMailboxPolicy –AllowedMimeTypes @{Add = "text/xml", "application/xml"}
Remember to ensure the settings in the ECP at permissions -> Outlook
Wep App policies -> file access match those in servers -> virtual
directories -> owa (Default Web Site) -> file access in terms of
Direct File Access which enables or disables direct access to all file
types in OWA. If this parameter is set to $False, users will not be
able to click on attachments in e-mails to open or save the files. The
attachment is visible, but the link is grayed out.
First-party source: https://support.microsoft.com/en-us/help/2852113/office-365-users-can-t-open-or-view-attachments-in-outlook-web-app
– thims – 2017-01-31T16:27:21.187@thims Good find. Added to answer. – DavidPostill – 2017-01-31T17:23:50.030
This works perfectly. If there is already an active session in owa, then after changes refresh is needed - onpage navigation doesn't refresh access policies. – RassK – 2017-02-03T08:09:14.123