Edit

How to configure Global Secure Access web content filtering

Important

You might see a red Deprecating soon label next to Web Content Filtering Policy (V1) in the Microsoft Entra admin center. This label is displayed in error. Your existing web content filtering policies aren't affected, continue to work as configured, and no action is required at this time. This article is updated when the display issue is resolved.

Overview

Web content filtering empowers you to implement granular Internet access controls for your organization based on website categorization.

Microsoft Entra Internet Access's first Secure Web Gateway (SWG) features include web content filtering based on domain names. Microsoft integrates granular filtering policies with Microsoft Entra ID and Microsoft Entra Conditional Access, which results in filtering policies that are user-aware, context-aware, and easy to manage.

The web filtering feature currently supports user- and context-aware Uniform Resource Locator (URL)-based web category filtering, URL filtering, and FQDN filtering.

Web content filtering also supports two optional rule conditions that enable traffic-aware policy enforcement:

  • Source traffic type filtering (preview): Scope rules to specific traffic types, such as agent, browser, or application.
  • HTTP method request filtering (preview): Block or allow specific HTTP methods, such as GET, POST, PUT, PATCH, and DELETE.

Tip

For file type-based filtering (MIME types) and integration with Microsoft Purview for data loss prevention, see Create a content policy to filter network file content.

Prerequisites

  • Administrators who interact with Global Secure Access features must have one or more of the following role assignments depending on the tasks they're performing.

  • Complete the Get started with Global Secure Access guide.

  • Install the Global Secure Access client on end user devices.

  • You must disable Domain Name System (DNS) over HTTPS (Secure DNS) to tunnel network traffic. Use the rules of the fully qualified domain names (FQDNs) in the traffic forwarding profile. For more information, see Configure the DNS client to support DoH.

  • Disable built-in DNS client on Chrome and Microsoft Edge.

  • IPv6 traffic isn't acquired by the client and is therefore transferred directly to the network. To enable all relevant traffic to be tunneled, set the network adapter properties to IPv4 preferred.

  • User Datagram Protocol (UDP) traffic (that is, QUIC) isn't supported in the current preview of Internet Access. Most websites support fallback to Transmission Control Protocol (TCP) when QUIC can't be established. For an improved user experience, you can deploy a Windows Firewall rule that blocks outbound UDP 443: New-NetFirewallRule -DisplayName "Block QUIC" -Direction Outbound -Action Block -Protocol UDP -RemotePort 443.

  • To enforce source traffic type and HTTP method request rules for HTTPS traffic, enable TLS inspection. Without TLS inspection, only Server Name Indication (SNI)-based web content filtering rules apply.

  • Source traffic type filtering requires client-based Global Secure Access connections. Remote networks don't support source traffic type rules.

  • Review web content filtering concepts. For more information, see web content filtering.

High level steps

There are several steps to configuring web content filtering. Take note of where you need to configure a Conditional Access policy.

  1. Enable internet traffic forwarding.
  2. Create a web content filtering policy.
  3. Create a security profile.
  4. Link the security profile to a Conditional Access policy.
  5. Assign users or groups to the traffic forwarding profile.

Enable internet traffic forwarding

The first step is to enable the Internet Access traffic forwarding profile. For more information about the profile and how to enable it, see How to manage the Internet Access traffic forwarding profile.

Create a web content filtering policy

  1. Browse to Global Secure Access > Secure > web content filtering policy.
  2. Select Create policy.
  3. Enter a name and description for the policy and select Next.
  4. Select Add rule.
  5. Enter a name, select a web category, a valid URL, or a valid FQDN, and then select Add.
    • Valid URLs and FQDNs in this feature can also include wildcards using the asterisk symbol, *, and can be comma-separated lists.
    • When entering FQDNs, use the domain name only. Don't include protocols (such as https://), port numbers, or URL paths. For example, enter contoso.com instead of https://contoso.com:443/path.
    • To match all subdomains of a domain, use the wildcard format *.domain.com. Note that the wildcard *.domain.com matches subdomains like www.domain.com but doesn't match the root domain domain.com itself. To cover both the domain and all its subdomains, include both entries as a comma-separated list (for example, *.contoso.com,contoso.com).
    • When entering multiple FQDNs in a comma-separated list, don't include spaces between entries (for example, contoso.com,fabrikam.com,*.example.com).
    • Note, the URL filtering Preview supports a maximum of 1,000 URLs per tenant.
  6. (Optional) Configure the Source type condition (preview). For more information, see Configure source traffic type filtering (preview).
  7. (Optional) Configure the HTTP method request condition (preview). For more information, see Configure HTTP method request filtering (preview).
  8. Select Next to review the policy and then select Create policy.

Configure source traffic type filtering (preview)

Source traffic type filtering lets you scope web content filtering rules to specific types of network traffic. You can enforce differentiated policies based on whether traffic originates from an AI agent, a web browser, or an application.

Supported source traffic types

Source type Description
Agent Traffic that originates from AI agents, such as Copilot agents or autonomous AI tools.
Browser Traffic that originates from web browsers.
Application Traffic that originates from desktop or mobile applications.
Unknown Traffic where the source type can't be determined.

Configure the source traffic type condition

  1. In the web content filtering rule configuration, locate the Source type field.
  2. Enable the Source type field to include it in the rule.
  3. Select the source traffic types to include in the rule.

Note

Source traffic type filtering is available only for client-based Global Secure Access connections. This capability depends on the Global Secure Access client sending task and processor metadata to classify traffic. Remote networks don't support source traffic type rules.

Note

When a request's traffic type can't be determined, traffic is classified as Unknown. Traffic-type-specific rules don't match unless you explicitly target Unknown in a rule.

Example: Block AI agents from accessing social networking sites

To prevent AI agents from accessing social networking websites while allowing browser and application traffic:

  1. Create a web content filtering policy rule.
  2. Select the SocialNetworking web category.
  3. Enable Source type and select Agent.
  4. Set the policy action to Block.

This configuration blocks AI agent traffic to social networking sites while allowing browser and application users to access the same sites.

Configure HTTP method request filtering (preview)

HTTP method request filtering lets you block or allow specific HTTP methods for matching traffic. You can enforce least-privilege access by restricting write operations while permitting read-only access.

Supported HTTP methods

Method Description
GET Retrieve a resource.
POST Submit data to a resource.
PUT Replace a resource.
PATCH Partially update a resource.
DELETE Remove a resource.

Configure the HTTP method request condition

  1. In the web content filtering rule configuration, locate the HTTP method request field.
  2. Enable the HTTP method request field to include it in the rule.
  3. Select the HTTP methods to include in the rule.

Important

HTTP method enforcement requires TLS inspection for HTTPS traffic. Without TLS inspection, the Secure Web Gateway can't observe HTTP method headers, and only SNI-based web content filtering rules apply. Unencrypted HTTP traffic is always inspectable.

Example: Block AI agent write operations

To prevent AI agents from performing write operations (PUT, PATCH, and DELETE) on enterprise resources:

  1. Create a web content filtering policy rule.
  2. Select the destination URLs, FQDNs, or web categories you want to protect.
  3. Enable Source type and select Agent.
  4. Enable HTTP method request and select PUT, PATCH, and DELETE.
  5. Set the policy action to Block.

This configuration blocks AI agent traffic from performing write operations on the specified destinations while allowing GET and other read-only methods.

Combine source traffic type and HTTP method conditions

You can use source traffic type and HTTP method request conditions independently or together in a single rule:

  • Source type only: Apply a rule to all traffic from a specific source type regardless of HTTP method.
  • HTTP method request only: Apply a rule to specific HTTP methods regardless of traffic source.
  • Both conditions: Apply a rule only when both the source traffic type and the HTTP method match.

When you configure both conditions in a rule, a request must match both the specified source traffic type and the specified HTTP method for the rule to apply. Conditions are evaluated using AND logic across attributes.

Policy evaluation and precedence

Policy evaluation follows the existing web content filtering policy framework ordering and precedence rules:

  • Within the same attribute: OR logic. Matching any selected value triggers the condition.
  • Across attributes: AND logic. All configured conditions must match.
  • Conflicting actions: When multiple policies match with conflicting actions, the most restrictive action wins (block over allow).

Create a security profile

Security profiles are a grouping of filtering policies. You can assign, or link, security profiles with Microsoft Entra Conditional Access policies. One security profile can contain multiple filtering policies. And one security profile can be associated with multiple Conditional Access policies.

In this step, you create a security profile to group filtering policies. Then you assign, or link, the security profiles with a Conditional Access policy to make them user or context aware.

Note

For more information about Microsoft Entra Conditional Access policies, see Building a Conditional Access policy.

  1. Browse to Global Secure Access > Secure > Security profiles.
  2. Select Create profile.
  3. Enter a name and description for the policy and select Next.
  4. Select Link a policy and then select Existing policy.
  5. Select the web content filtering policy you already created and select Add.
  6. Select Next to review the security profile and associated policy.
  7. Select Create a profile.
  8. Select Refresh to refresh the profiles page and view the new profile.

Create a Conditional Access policy for end users or groups and deliver your security profile through Conditional Access Session controls. Conditional Access is the delivery mechanism for user and context awareness for Internet Access policies. For more information about session controls, see Conditional Access: Session.

  1. Sign in to the Microsoft Entra admin center as at least a Conditional Access Administrator.
  2. Browse to Entra ID > Conditional Access > Policies.
  3. Select New policy.
  4. Give your policy a name. Organizations should create a meaningful standard for the names of their policies.
  5. Under Assignments, select Users or workload identities.
    1. Under Include, select All users
  6. Select Target resources and All internet resources with Global Secure Access.
  7. Select Session > Use Global Secure Access security profile and choose a security profile.
  8. Select Select.
  9. In the Enable policy section, ensure On is selected.
  10. Select Create.

Note

Explicit Forward Proxy (EFP) preview is not currently included in the All internet resources with Global Secure Access group. If your users use Explicit Forward Proxy (preview), please follow How to configure EFP Conditional Access Policies

Enable web content filtering for remote network traffic

Remote network connectivity allows you to connect branch offices and other remote locations to Global Secure Access without installing the client on individual devices. For more information about remote network connectivity, see Global Secure Access remote network connectivity.

You can use the baseline security profile to apply tenant-wide web content filtering policies to all remote network traffic. The baseline profile enforces policies at the lowest priority in the policy stack and applies to all Internet Access traffic routed through the service, making it ideal for securing remote network locations.

Important

Source traffic type filtering isn't supported for remote network traffic. Source traffic type rules require the Global Secure Access client to provide task and processor metadata for traffic classification. You can still apply web category, URL, FQDN, and HTTP method rules without source traffic type conditions to remote networks through the baseline profile.

  1. Browse to Global Secure Access > Secure > Security profiles > Baseline profile.

  2. Select Link a policy and then select Existing policy.

  3. Select the web content filtering policy you want to apply to remote network traffic and select Add.

  4. The baseline profile automatically applies to all remote network traffic without requiring a Conditional Access policy.

    Screenshot of the Security profiles page showing the Baseline profile tab with the baseline profile listed at priority 65000.

Note

The baseline security profile applies to all traffic routed through Global Secure Access, including both client-based and remote network traffic. No Conditional Access policy configuration is required for remote network traffic, as the baseline profile enforces policies by default.

For more information on applying security policies to remote networks, see Apply security policies to remote network traffic.

Internet Access flow diagram

This example demonstrates the flow of Microsoft Entra Internet Access traffic when you apply web content filtering policies.

The following flow diagram illustrates web content filtering policies blocking or allowing access to internet resources.

Diagram shows flow for web content filtering policies blocking or allowing access to internet resources.

Step Description
1 The Global Secure Access client attempts to connect to Microsoft's Security Service Edge solution. The client includes task and processor metadata for source traffic type classification.
2 The client redirects to Microsoft Entra ID for authentication and authorization.
3 The user and device authenticate. Authentication happens seamlessly when the user has a valid Primary Refresh Token (PRT).
4 After the user and device authenticate, Conditional Access matches on Internet Access Conditional Access rules and adds applicable security profiles to the token. It enforces applicable authorization policies.
5 Microsoft Entra ID presents the token to Microsoft Security Service Edge for validation.
6 The tunnel establishes between the Global Secure Access client and Microsoft Security Service Edge.
7 Traffic starts being acquired and tunnels through the Internet Access tunnel.
8 Microsoft Security Service Edge evaluates the security policies in the access token in priority order. It evaluates source traffic type, HTTP method, web category, URL, and FQDN conditions. After it matches on a web content filtering rule, web content filtering policy evaluation stops.
9 Microsoft Security Service Edge enforces the security policies.
10 Policy = block results in an error for HTTP traffic or a connection reset exception occurs for HTTPS traffic.
11 Policy = allow results in traffic forwarding to the destination.

Note

Applying a new security profile can take up to 60-90 minutes due to security profile enforcement with access tokens. The user must receive a new access token with the new security profile ID as a claim before it takes effect. Changes to existing security profiles start being enforced much more quickly.

User and group assignments

You can scope the Internet Access profile to specific users and groups. For more information about user and group assignment, see How to assign and manage users and groups with traffic forwarding profiles.

Verify end user policy enforcement

When traffic reaches Microsoft's Secure Service Edge, Microsoft Entra Internet Access performs security controls in two ways. For unencrypted HTTP traffic, it uses the Uniform Resource Locator (URL). For HTTPS traffic encrypted with Transport Layer Security (TLS), it uses the Server Name Indication (SNI).

Use a Windows device with the Global Secure Access client installed. Sign in as a user that is assigned the Internet traffic acquisition profile. Test that navigating to websites is allowed or restricted as expected.

  1. Right-click on the Global Secure Access client icon in the task manager tray and open Advanced Diagnostics > Forwarding profile. Ensure that the Internet access acquisition rules are present. Also, check if the hostname acquisition and flows for the users Internet traffic are being acquired while browsing.

  2. Navigate to allowed and blocked sites and check if they behave properly. Browse to Global Secure Access > Monitor > Traffic logs to confirm traffic is blocked or allowed appropriately.

  3. To verify source traffic type and HTTP method request rules, generate traffic from different source types. For example, use an AI agent to send a PATCH request to a protected resource, and confirm the rule enforces correctly in Traffic logs.

The current blocking experience for all browsers includes a plaintext browser error for HTTP traffic and a "Connection Reset" browser error for HTTPS traffic.

Screenshot that shows a plaintext browser error for unencrypted or TLS inspected HTTP traffic.

Screenshot that shows a "Connection Reset" browser error for HTTPS traffic.

Note

Configuration changes in the Global Secure Access experience related to web content filtering typically take effect in less than 5 minutes. Configuration changes in Conditional Access related to web content filtering take effect in approximately one hour.

Note

To expedite Conditional Access configuration changes for testing, revoke user sessions in the Microsoft Entra admin center (select Revoke sessions on the user's overview page). This forces users to obtain new tokens with updated policies. Learn more about Continuous Access Evaluation.