Skip to main content
McAfee MVISION Cloud

Reverse Proxy for Office 365 via Azure AD

McAfee's Reverse Proxy is a method to restrict access of authorized applications from unmanaged devices. Generally, the reverse proxy allows unmanaged devices to go through the SAML authentication process. As a result, authorized applications from all managed or unmanaged devices are redirected to the MVISION Cloud proxy. But if you use Office 365 and authenticate via Azure Active Directory (also called Passthrough Authentication), then this method is unsuccessful because the authentication is not redirected through SAML authentication. 

To overcome this problem, Azure AD provides a security feature called Conditional Access. This topic describes the steps to Configure Reverse Proxy for Office 365 via Azure AD.

How it Works

Azure AD Conditional Access allows your devices to access Office 365 only when you log in through the Web Gateway Cloud Service (WCGS) IPs or MVISION Cloud reverse proxy IPs. If you login directly to Office 365 without passing through WGCS or MVISION Cloud's reverse proxy IPs, your IP address is blocked by Azure AD Conditional Access. 
clipboard_e428947751c724abb2ba48c99742f2ccb.png

For Managed Devices, Conditional Access policies are applied only to the login process, and you are not required to send Office 365 network traffics such as office.com or office365.com through WGCS.

All non-authentication URL requests or the post-authentication requests can be bypassed in McAfee Client Proxy (MCP). At this point, the login process is proxied to meet the Conditional Access policy requirements, so proxy passes all subsequent network traffic directly to Office 365. This way Microsoft's policy is not violated in third-party network devices while inspecting Office 365 network traffic.

Prerequisites 

Before you begin, make sure you have met the following prerequisites:

  • Access to an Office 365 tenant authenticated via Azure AD (default authentication mechanism) and your Office 365 tenant should be licensed for Azure AD Premium P1. For more details, see Azure Active Directory Pricing and Microsoft-365-business-service-description.
  • Admin Access to Azure AD portal (https://portal.azure.com).
  • Access to MVISION Cloud tenant enabled with the Web Gateway Cloud Service (WCGS) or Unified Cloud Edge (UCE).
  • A managed or unmanaged device installed and configured with McAfee Client Proxy to pass network traffic through WGCS or UCE.
  • An unmanaged device that does not send network traffic through WGCS or UCE.

NOTE : To get the reverse proxy IP address for specific POPs or tenants, contact MVISION Cloud Support.

Configure Reverse Proxy for Office 365 via Azure AD

Perform the following steps to configure Reverse Proxy for Office 365 via Azure AD. 

Step 1: Configure Conditional Access in Azure AD Portal

NOTE: To achieve this configuration, make sure your Office 365 tenant is licensed for Azure AD Premium P1.

This configuration blocks direct login attempts of unmanaged devices to Office 365 and allows only the devices that login through WGCS or MVISION Cloud reverse proxy.

To configure conditional access, perform the following activities:

Configure New Location

  1. Download the current list of outbound IP ranges for WCGS and the IP ranges for MVISION Cloud reverse proxy.

NOTE: To get the MVISION Cloud reverse proxy IP address for specific POPs or tenants, contact MVISION Cloud Support.

  1. Login to the Azure AD admin portal.
  2. Go to Azure Active Directory > Security > Conditional Access > Named locations and click New location.
    clipboard_e2bf0c16855e41f35266dd209d5e5614a.png
  3. Enter a name for your new location. For example, McAfee WGCS. 
  4. Click IP ranges radio button. Copy and paste the IP ranges from the list you downloaded in step 1. 
    clipboard_ecec585853222e4b4b9870c9433fa0f69.png

NOTE: The limit of IP ranges per location is 12.

  1. Repeat the steps 3 to 5 until you add all the IP ranges from the WGCS and MVC reverse proxy lists. Optionally, you can add any public IPs specific to your deployment that are egress IPs from on-premises locations.
  2. Click Save.

Configure New Policy

  1. Go to Policies and click New policy.
    clipboard_e5e33a2d1f2cf5281fca2532152f274f3.png
  2. Enter your policy name. For example, Allow only WGCS and MVISION Cloud reverse proxy.
  3. Choose Users and groups, click the Select users and groups radio button, and select the checkbox Users and Groups.
  4. To add a user to the policy, click Select.
    clipboard_efb07d83ec476dbdc6c74c60d15a363d9.png
  5. Select the required user and click Done.

NOTE: You can lock inside the Office 365 tenant entirely, if you apply this policy to all users.

  1. Click Conditions > Locations. Under Configure, click Yes and under Include, click Any location radio button.
    clipboard_e8648d44bd21a5f8411d954b936e4ed3b.png
  2. Under Exclude, click Selected locations radio button. Click Select and select all the locations created in the section Configure New Location.
    clipboard_edaeb8c0dd247c90299859aa3d3e8f587.png
  3. Click Done.
  4. Choose Grant and click Block access radio button. To confirm this selection, click Select.
    clipboard_ec9f88ec38e9289e76708f31fd1011b8a.png
  5. To enable the policy, click On.
    clipboard_ebadd579bb935aac51e55ab682bf3bc55.png
  6. Click Create.

NOTE: If you get an error when enabling the proxy due to these two reasons, then do the following:

  • Either no IP address is assigned to your tenant: If you have never tried to enable proxy in this tenant before, then you need to create a support ticket.
  • Any duplicate configuration present: If you have successfully enabled proxy at some point in the past, then you need to rename your service instance to resolve a potential duplicate configuration.

Step 2: Configure MVISION Cloud Reverse Proxy

This configuration allows you to create a proxy URL for Office 365 in MVISION Cloud. The integration with the identity provider (Azure AD) is not supported, so this is not considered to be a complete reverse proxy configuration.

To configure the reverse proxy, perform the following activities:

  1. Login to MVISION Cloud and go to Settings > Service Management.
  2. Click Add Service Instance.
  3. Click Microsoft Office 365 and OneDrive and enter a name for your service instance.
    clipboard_ea665d455ed21576ad4b283b83a7d32c4.png
  4. Click Done.
  5. On the Service Management page, expand Microsoft Office 365 and OneDrive and click your service instance name. 
  6. Go to Setup and click Get Started.
    clipboard_e58dc11aeed607ff6d265fe393e952d42.png
  7. Under Configure proxy, click Configure.
    clipboard_eb4bccf3e464745b1a440de549a8e6a93.png
  8. Under Select Proxy Location, set the Proxy Location as MVISION Cloud and click Next.
    clipboard_eb5baebbeb296db7f73801f9d323147e4.png
  9. Under Set up Proxy Domain, configure the following:
    • Set the Host Name as portal.office.com
    • Select Proxy Domain as {{product}} Aliased Domain and click Next.
      clipboard_ecf6678a1dba90e21bc67b72dd3919783.png
  10. Click Done.
  11. Once the proxy is enabled, click Show Details to find the Proxy URL. You need this URL in the Validate Unmanaged Device Proxy Login section.
    clipboard_ee1bbab0ada33703394b696725dba92e1.png

Step 3: Configure MVISION Cloud Access Policy

This configuration manages proxy traffic from both managed and unmanaged devices.

To configure cloud access policy, perform the following activities:

  1. Login to MVISION Cloud and configure device management through certificates. For details, see Manage Devices using Certificates. 
  2. Go to Policy > Access Control > Access Policies and click Create Policy.
  3. Create a new cloud access policy to redirect managed devices directly to Office 365 using the following configuration.
    • Under conditions, select:
      • Service: is Microsoft Office 365 and OneDrive.
      • Agent: is McAfee MCP.
    • Under action, select Skip Cert Check: Redirect All.
    • Click Save. 
      clipboard_edbd0c8705fff009d68a59412ab2aad61.png
  4. Create another new cloud access policy to proxy the traffic from unmanaged devices to Office 365 using the following configuration.
    • Under conditions, select Service: is Microsoft Office 365 and OneDrive.
    • Under action, select Cert Check: Proxy All.
    • Click Save. 
      clipboard_e41c0603dd6bffa8b996713875a53881e.png
  5. Make sure your policies are created on the Cloud Access Policies page.
    clipboard_ea42d05e39f8fe2868a740408ab92a498.png

About McAfee Client Proxy (MCP) Configuration

In general, the MCP Policy can be configured in multiple interfaces. In this case, MCP bypasses any Microsoft domains or hosts such as office.com, office365.com, or sharepoint.com. This way, McAfee is not sending proxy traffic to Office 365 and not violating Microsoft's service agreement that would affect the user experience.  However, only the login URL (login.microsoftonline.com) is proxied to meet the Conditional Access policy requirements.

About Vanity URL Configuration

The proxy URL provided by MVISION Cloud is not user-friendly. So a vanity URL helps users remember it and shares information on how to log in to Office 365.

The user on the unmanaged device directly logs in to Office 365 (office.com) and gets a blocked page from Azure AD Conditional Access that does not specify why the user was blocked or the solution to fix it. A vanity URL helps to provide the correct process for users. For example, remembering to login to office.mcafee.com is easier than office.mcafeeprod.mcafeeprod.myshn.net. 

There are many ways to configure a vanity URL in the user’s domain, but you can only do it on the user's side. Remember, it cannot be configured with a customer name (CNAME) record, but requires URL redirect to the MVISION Cloud proxy URL. For example, office.testfire.me should provide a redirect to office.testfire.skyhigh9722.myshn.net.

The steps to configure Reverse Proxy for Office 365 via Azure AD is completed.

Step 4: Validate Reverse Proxy for Office 365 via Azure AD

To verify the outcome of the reverse proxy for Office 365 via Azure AD, perform the following validation scenarios:

Validate Unmanaged Device Direct Login

NOTE: MCP is not installed for Unmanaged Device direct login.

  1. Login to Office 365 URL (login.microsoftonline.com).
  2. You are redirected to the Microsoft block page.
    clipboard_ebc7960a4f09d94366a8ebd11211c2d48.png

This shows that you have successfully configured Conditional Access in Azure AD.

Validate Unmanaged Device Proxy Login

NOTE: MCP is not installed for Unmanaged Device direct login.

  1. Login to Office 365 either through the proxy URL obtained in the MVISION Cloud Reverse proxy or via the Vanity URL.
  2. You are redirected successfully to Office 365 via proxy URL.

This shows that you have successfully configured MVISION Cloud Access policy and Reverse Proxy.

Validate Managed Device Login

NOTE: MCP is installed for Managed Devices, and it redirects Office 365 to WCGS or UCE.

  1. Login to Office 365 URL (login.microsoftonline.com) or the proxy URL obtained in the MVISION Cloud Reverse proxy or the Vanity URL.
  2. You are redirected successfully to Office 365.

This shows that you have successfully configured Managed Device login via Azure AD. 

Solution for Non MVISION Cloud Forward Proxy Users

If you are not using MVISION Cloud's WCGS or Unified Cloud Edge (UCE) for a forward proxy, perform the following activities:

The only prerequisite is to provide predictable IP ranges, and they should determine all the traffic from managed devices. Managed devices should pass from these known IPs. This forward proxy solution is for your public egress IP ranges.

 

  • Was this article helpful?