Go to https://security.microsoft.com
From there, select E-mail & collaboration, policies & rules then threat policies.
Select anti-spam.
Click on the anti-spam inbound policy and scroll down to allowed and blocked senders and domains.
Select the edit link and from the allowed pane, you have the option to allow senders or domains. Note: When blocking or allowing public email domains such as Gmail, Yahoo, etc. be aware that blocking such domains will render all senders blocked and allowing these domains will permit known SPAM addresses from these domains.
It’s recommended that publicly used email domains not be blocked or allowed to avoid email delivery problems.