How do I limit users to a specific Office365 Tenant?

Article #: Product Castle
KB-181 Guardian  


How to restrict Office365 to only work with the tenants you specify, for example,


You want to limit your users to only accessing your company or student Office 365 account and prevent them from accessing their personal accounts.


Note: The solution shown below requires HTTPS interception to be setup and working on the Guardian web filter — see

First we need to create a content modification:

  1. Go to Guardian > Content modification > Content modifications.
  2. Enter a name (for example, Office365 Tenant Restriction).
  3. Enter the following under Request Headers to Override:
  4. Restrict-Access-To-Tenants: domain.tld

    Where domain.tld is the domain to be allowed through.

    More than one domain can be added by separating them by commas - Restrict-Access-To-Tenants:,

    Create a content modification policy, with the following aspects:


Last updated: Author: Contributions by:
08 August 2017 Jonathan McKeague