Allow or block URLs using the Tenant Allow/Block List

Tip

Did you know you can try the features in Microsoft 365 Defender for Office 365 Plan 2 for free? Use the 90-day Defender for Office 365 trial at the Microsoft 365 Defender portal trials hub. Learn about who can sign up and trial terms here.

Applies to

This article describes how to create and manage URL allow and block entries that are available in the Tenant Allow/Block List. For more information about the Tenant Allow/Block List, see Manage your allows and blocks in the Tenant Allow/Block List.

You manage allow and block entries for URLs in the Microsoft 365 Defender Portal or in Exchange Online PowerShell. Messages containing the blocked URLs are quarantined.

What do you need to know before you begin?

  • You open the Microsoft 365 Defender portal at https://security.microsoft.com. To go directly to the Tenant Allow/Block List page, use https://security.microsoft.com/tenantAllowBlockList. To go directly to the Submissions page, use https://security.microsoft.com/reportsubmission.

  • To connect to Exchange Online PowerShell, see Connect to Exchange Online PowerShell. To connect to standalone EOP PowerShell, see Connect to Exchange Online Protection PowerShell.

  • For URL entry syntax, see the URL syntax for the Tenant Allow/Block List section later in this article.

  • For URLs, the maximum number of allow entries is 500, and the maximum number of block entries is 500 (1000 URL entries total).

  • You can enter a maximum of 250 characters in a URL entry.

  • An entry should be active within 30 minutes, but it might take up to 24 hours for the entry to be active.

  • You need to be assigned permissions in Exchange Online before you can do the procedures in this article:

    • To add and remove values from the Tenant Allow/Block List, you need to be a member of one of the following role groups:
      • Organization Management or Security Administrator role group (Security admin role)
      • Security Operator role group (Tenant AllowBlockList Manager).
    • For read-only access to the Tenant Allow/Block List, you need to be a member of one of the following role groups:
      • Global Reader role group
      • Security Reader role group
      • View-Only configuration role group

    For more information, see Permissions in Exchange Online.

    Notes:

    • Adding users to the corresponding Azure Active Directory role in the Microsoft 365 admin center gives users the required permissions and permissions for other features in Microsoft 365. For more information, see About admin roles.
    • The View-Only Organization Management role group in Exchange Online also gives read-only access to the feature.

Create block entries for URLs

You have the following options to create block entries for URLs:

Use the Microsoft 365 Defender portal to create block entries for URLs in the Submissions portal

When you use the Submissions portal at https://security.microsoft.com/reportsubmission to report URLs as Should have been blocked (False negative), you can select Block this URL to add a block entry on the URLs tab in the Tenant Allow/Block List.

For instructions, see Report questionable URLs to Microsoft.

Use the Microsoft 365 Defender portal to create block entries for URLs in the Tenant Allow/Block List

You can create block entries for URLs directly in the Tenant Allow/Block List.

Email messages that contain these blocked URLs are blocked as high confidence phishing.

  1. In the Microsoft 365 Defender portal at https://security.microsoft.com, go to Policies & rules > Threat Policies > Rules section > Tenant Allow/Block Lists. Or, to go directly to the Tenant Allow/Block List page, use https://security.microsoft.com/tenantAllowBlockList.

  2. On the Tenant Allow/Block List page, select the URLs tab.

  3. On the URLs tab, click Block icon. Block.

  4. In the Block URLs flyout that appears, configure the following settings:

    • Add URLs with wildcards: Enter one URL per line, up to a maximum of 20. For details about the syntax for URL entries, see the URL syntax for the Tenant Allow/Block List section later in this article.

    • Remove block entry after: The default value is 30 days, but you can select from the following values:

      • Never expire
      • 1 day
      • 7 days
      • 30 days
      • Specific date: The maximum value is 90 days from today.
    • Optional note: Enter descriptive text for the entries.

  5. When you're finished, click Add.

Use PowerShell to create block entries for URLs in the Tenant Allow/Block List

In Exchange Online PowerShell, use the following syntax:

New-TenantAllowBlockListItems -ListType Url -Block -Entries "Value1","Value2",..."ValueN" <-ExpirationDate <Date> | -NoExpiration> [-Notes <String>]

This example adds a block entry for the URL contoso.com and all subdomains (for example, contoso.com and xyz.abc.contoso.com). Because we didn't use the ExpirationDate or NoExpiration parameters, the entry expires after 30 days.

New-TenantAllowBlockListItems -ListType Url -Block -Entries ~contoso.com

For detailed syntax and parameter information, see New-TenantAllowBlockListItems.

Use the Microsoft 365 Defender portal to create allow entries for URLs in the Submissions portal

You can't create URL allow entries directly in the Tenant Allow/Block List. Instead, you use the Submissions portal at https://security.microsoft.com/reportsubmission to report the URL as a false positive, which also adds an allow entry on the URLs tab in the Tenant Allow/Block List.

For instructions, see Report good URLs to Microsoft.

Important

Because Microsoft manages allow entries for you, unneeded URL allow entries will be removed. This behavior protects your organization and helps prevent misconfigured allow entries. If you disagree with the verdict, you might need to open a support case to help determine why a URL is still considered bad.

Use the Microsoft 365 Defender portal to view allow or block entries for URLs in the Tenant Allow/Block List

  1. In the Microsoft 365 Defender portal at https://security.microsoft.com, go to Policies & rules > Threat Policies > Tenant Allow/Block Lists in the Rules section. Or, to go directly to the Tenant Allow/Block Lists page, use https://security.microsoft.com/tenantAllowBlockList.

  2. Select the URL tab. The following columns are available:

    • Value: The URL.
    • Action: The value Allow or Block.
    • Modified by
    • Last updated
    • Remove on: The expiration date.
    • Notes

    Click on a column heading to sort in ascending or descending order.

    Click Group icon. Group to group the results by None or Action.

    Click Search icon. Search, enter all or part of a value, and then press ENTER to find a specific value. When you're finished, click Clear search icon. to clear the search.

    Click Filter icon. Filter to filter the results. The following values are available in the Filter flyout that appears:

    • Action: Allow and Block.
    • Never expire: Toggle on. or Toggle off.
    • Last updated: Select From and To dates.
    • Remove on: Select From and To dates.

    When you're finished, click Apply. To clear existing filters, click Clear filters icon Clear filters in the Filter flyout.

Use PowerShell to view allow or block entries for URLs in the Tenant Allow/Block List

In Exchange Online PowerShell, use the following syntax:

Get-TenantAllowBlockListItems -ListType Url [-Allow] [-Block] [-Entry <URLValue>] [<-ExpirationDate <Date> | -NoExpiration>]

This example returns all allowed and blocked URLs.

Get-TenantAllowBlockListItems -ListType Url

This example filters the results by blocked URLs.

Get-TenantAllowBlockListItems -ListType Url -Block

For detailed syntax and parameter information, see Get-TenantAllowBlockListItems.

Use the Microsoft 365 Defender portal to modify allow or block entries for URLs in the Tenant Allow/Block List

When you modify allow or block entries for URLs in the Tenant Allow/Block list, you can only modify the expiration date and notes.

  1. In the Microsoft 365 Defender portal at https://security.microsoft.com, go to Policies & rules > Threat Policies > Rules section > Tenant Allow/Block Lists. Or, to go directly to the Tenant Allow/Block List page, use https://security.microsoft.com/tenantAllowBlockList.

  2. Select the URLs tab

  3. On the URLs tab, select the check box of the entry that you want to modify, and then click the Edit icon. Edit button that appears.

  4. The following values are available in the Edit URL flyout that appears:

    • Remove allow entry after or Remove block entry after:

      • You can extend allow entries for a maximum of 30 days after the creation date.
      • You can extend block entries for a maximum of 90 days after the creation date or set them to Never expire.
    • Optional note

    When you're finished, click Save.

Note

For allow entries only, if you select the entry by clicking anywhere in the row other than the check box, you can select View submission icon. View submission in the details flyout that appears to go to the Submissions page at https://security.microsoft.com/reportsubmission.

Use PowerShell to modify allow or block entries for URLs in the Tenant Allow/Block List

In Exchange Online PowerShell, use the following syntax:

Set-TenantAllowBlockListItems -ListType Url <-Ids <Identity value> | -Entries <Value value>> [<-ExpirationDate Date | -NoExpiration>] [-Notes <String>]

This example changes the expiration date of the block entry for the specified URL.

Set-TenantAllowBlockListItems -ListType Url -Entries "~contoso.com" -ExpirationDate "9/1/2022"

For detailed syntax and parameter information, see Set-TenantAllowBlockListItems.

Use the Microsoft 365 Defender portal to remove allow or block entries for URLs from the Tenant Allow/Block List

  1. In the Microsoft 365 Defender portal at https://security.microsoft.com, go to Policies & rules > Threat Policies > Rules section > Tenant Allow/Block Lists. Or, to go directly to the Tenant Allow/Block List page, use https://security.microsoft.com/tenantAllowBlockList.

  2. Select the URLs tab.

  3. On the URLs tab, do one of the following steps:

    • Select the check box of the entry that you want to remove, and then click the Delete icon. Delete icon that appears.
    • Select the entry that you want to remove by clicking anywhere in the row other than the check box. In the details flyout that appears, click Delete icon. Delete.
  4. In the warning dialog that appears, click Delete.

Note

You can select multiple entries by selecting each check box, or select all entries by selecting the check box next to the Value column header.

Use PowerShell to remove allow or block entries for URLs from the Tenant Allow/Block List

In Exchange Online PowerShell, use the following syntax:

Remove-TenantAllowBlockListItems -ListType Url <-Ids <Identity value> | -Entries <Value value>>

This example removes the block entry for the specified URL from the Tenant Allow/Block List.

Remove-TenantAllowBlockListItems -ListType Url -Entries "~cohovineyard.com

For detailed syntax and parameter information, see Remove-TenantAllowBlockListItems.

URL syntax for the Tenant Allow/Block List

  • IPv4 and IPv6 addresses are allowed, but TCP/UDP ports are not.

  • Filename extensions are not allowed (for example, test.pdf).

  • Unicode is not supported, but Punycode is.

  • Hostnames are allowed if all of the following statements are true:

    • The hostname contains a period.
    • There is at least one character to the left of the period.
    • There are at least two characters to the right of the period.

    For example, t.co is allowed; .com or contoso. are not allowed.

  • Subpaths are not implied for allows.

    For example, contoso.com does not include contoso.com/a.

  • Wildcards (*) are allowed in the following scenarios:

    • A left wildcard must be followed by a period to specify a subdomain. (only applicable for blocks)

      For example, *.contoso.com is allowed; *contoso.com is not allowed.

    • A right wildcard must follow a forward slash (/) to specify a path.

      For example, contoso.com/* is allowed; contoso.com* or contoso.com/ab* are not allowed.

    • *.com* is invalid (not a resolvable domain and the right wildcard does not follow a forward slash).

    • Wildcards are not allowed in IP addresses.

  • The tilde (~) character is available in the following scenarios:

    • A left tilde implies a domain and all subdomains.

      For example ~contoso.com includes contoso.com and *.contoso.com.

  • A username or password isn't supported or required.

  • Quotes (' or ") are invalid characters.

  • A URL should include all redirects where possible.

URL entry scenarios

Valid URL entries and their results are described in the following sections.

Scenario: No wildcards

Entry: contoso.com

Scenario: Left wildcard (subdomain)

Note

This scenario applies only to blocks.

Entry: *.contoso.com

Scenario: Right wildcard at top of path

Entry: contoso.com/a/*

Scenario: Left tilde

Entry: ~contoso.com

  • Allow match and Block match:

  • Allow not matched and Block not matched:

Scenario: Right wildcard suffix

Entry: contoso.com/*

  • Allow match and Block match:

    • contoso.com/?q=whatever@fabrikam.com
    • contoso.com/a
    • contoso.com/a/b/c
    • contoso.com/ab
    • contoso.com/b
    • contoso.com/b/a/c
    • contoso.com/ba
  • Allow not matched and Block not matched: contoso.com

Scenario: Left wildcard subdomain and right wildcard suffix

Note

This scenario applies only to blocks.

Entry: *.contoso.com/*

Scenario: Left and right tilde

Entry: ~contoso.com~

  • Allow match and Block match:

  • Allow not matched and Block not matched:

    • 123contoso.com
    • contoso.org
    • test.com/q=contoso.com

Scenario: IP address

Entry: 1.2.3.4

  • Allow match and Block match: 1.2.3.4

  • Allow not matched and Block not matched:

    • 1.2.3.4/a
    • 11.2.3.4/a

IP address with right wildcard

Entry: 1.2.3.4/*

  • Allow match and Block match:

    • 1.2.3.4/b
    • 1.2.3.4/baaaa

Examples of invalid entries

The following entries are invalid:

  • Missing or invalid domain values:

    • contoso
    • *.contoso.*
    • *.com
    • *.pdf
  • Wildcard on text or without spacing characters:

    • *contoso.com
    • contoso.com*
    • *1.2.3.4
    • 1.2.3.4*
    • contoso.com/a*
    • contoso.com/ab*
  • IP addresses with ports:

    • contoso.com:443
    • abc.contoso.com:25
  • Non-descriptive wildcards:

    • *
    • *.*
  • Middle wildcards:

    • conto*so.com
    • conto~so.com
  • Double wildcards

    • contoso.com/**
    • contoso.com/*/*