Allow specific data file in Office365 for external recipients (Status code: 550 5.0.350)
Tags: office365, email, security, defender
Published: 2024-04-05 05:35:54



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n3ntqqnvj27mpl0n5qf6.png)

Are you admin and someone of the organization need to send a specific data file the must be attached in email rathen uploading it to onedrive and keep receiving this even you deploy this command in powershell?
**_**
$policy = Get-OwaMailboxPolicy [policy name]
$allowedFileTypes = $policy.AllowedFileTypes
$allowedFileTypes.Add(".foo")
Set-OwaMailboxPolicy $policy -AllowedFileTypes $allowedFileTypes**_**

or this

**_Set-OwaMailboxPolicy -Identity "<Policy Name>" -AllowedFileTypes @{Add=".foo"}_**

**Reference:** _https://techcommunity.microsoft.com/t5/exchange-team-blog/changes-to-file-types-blocked-in-outlook-on-the-web/ba-p/874451_

Due of MS keeps blocking data file to secure the the tenants Worldwide. If your organization requires to receive and send specific file types that attached from Outlook then how we allow data files to not stop our users productivity and still keep our organization.

Solution:

Part 1: Change and add file type in Office365
1. Go to security portal or https://security.microsoft.com/ to our browser.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ptip0fjb7eg9xvgrz32x.png)


2. Look to your right panel, search for Email & collaboration and tap the arrow down to show the underling setting.
 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hije7k2j6vuomifarxri.png)

3. Under of email & collaboration, tap the policies and rules > threat policies > Anti-Malware > click the default policy

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n8gsq97ax1ov0wpjqp0r.png)

4. Default policy UI will be prompt, scroll-down and tap the edit protection settings

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9mrp5uq5ncmbsxnv6bus.png)


5. Once we clicked, the edit protection settings  will be prompt. make sure the enable the common attachments filter is enable and under of this just tap the select file types.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gzegq2io0b5gp19jnbbd.png)

6. Under of the select file types, Microsoft have default file types and add the specific file type such as .dat and done 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tyr63ctrjtzjpzknn1vx.png)

8. You go back to edit protection settings, look for the when these file types are found then select the Quarantine the message and save.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/globnkpvz5fkflyzjzxp.png)

Part 2: try to send email with the specific file type attached in email.

Take note: You must not receive any NDR in outlook.

Part 3: Where's the email
Now emails won't block, check to the Quarantine dashboard. 

Security admin center (https://security.microsoft.com/) > Email & collaboration > Review > Quarantine > Approve the email.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dxruj75qmiadcptpxi2t.png)