How to Configure Teams Phone Emergency Subnet Mapping in PowerShell Using CsOnlineLisSubnet

In enterprise unified communications and VoIP environments, regulatory compliance mandates such as the RAY BAUM’S Act and Kari’s Law in the United States, alongside European emergency services directives, require automated and precise location delivery when users dial emergency numbers (such as 911 or 112). In Microsoft Teams Phone, this capability is governed by Dynamic Emergency Calling and the Location Information Service (LIS).

When an on-premises employee dials an emergency number from the Microsoft Teams desktop or IP phone client, the client queries the local network environment (extracting the client’s IPv4/IPv6 subnet, wireless access point BSSID, or network switch port) and correlates it against the tenant’s LIS topology database. By mapping network subnets directly to validated emergency civic addresses and sub-location identifiers using the CsOnlineLisSubnet cmdlets in PowerShell, telephony administrators ensure first responders receive real-time, building-, floor-, and room-specific dispatch information.

Architecture of Teams Location Information Service (LIS) Subnet Mapping

Microsoft Teams Phone determines dynamic physical location based on network topology matching. The relationship between network elements and emergency addresses adheres to a specific hierarchical model:

  • Civic Address (CsOnlineLisCivicAddress): The validated street address (country, state, city, postal code, street number).
  • Location (CsOnlineLisLocation): The specific sub-location associated with a civic address, such as “Floor 3, North Wing, Conference Room B”. Each location is identified by a unique LocationId GUID.
  • Subnet Mapping (CsOnlineLisSubnet): Maps an entire IP subnet CIDR block (such as 10.10.30.0/24) directly to a targeted LocationId.

When a Teams client initiates an emergency call, the Teams infrastructure looks up the client’s public and private IP addresses. If the subnet matches a defined LIS subnet, the corresponding civic address and location description are dynamically injected into the SIP signaling header routed to the Public Safety Answering Point (PSAP).

Connecting to the Microsoft Teams PowerShell Module

Managing Teams LIS network configurations requires the Microsoft Teams PowerShell module (version 4.0.0 or later) with appropriate administrative roles (such as Teams Administrator or Global Administrator).

Launch PowerShell and establish a management session:

# Install or update the Microsoft Teams module
Install-Module -Name MicrosoftTeams -Force -AllowClobber

# Connect to the Microsoft Teams tenant
Connect-MicrosoftTeams

Retrieving Validated Location IDs for Subnet Association

Before creating a subnet mapping, you must retrieve the unique LocationId of the pre-validated physical location where the subnet resides.

To inspect all configured locations in your tenant, execute:

Get-CsOnlineLisLocation | Format-Table LocationId, Location, CivicAddressId, CompanyName

To filter for a specific office location or floor, query by name:

$TargetLocation = Get-CsOnlineLisLocation | Where-Object { $_.Location -like "*Floor 4 - Engineering*" }
$TargetLocation | Select-Object LocationId, Location, CivicAddressId
$LocationId = $TargetLocation.LocationId

Store the LocationId GUID, as it is required to link network subnets to this geographical position.

Creating New LIS Subnet Mappings with Set-CsOnlineLisSubnet

In Microsoft Teams Phone PowerShell, the Set-CsOnlineLisSubnet cmdlet is used both to create new subnet associations and to modify existing ones.

To associate an IPv4 subnet (such as 192.168.45.0/24) with the target location, run:

Set-CsOnlineLisSubnet -Subnet "192.168.45.0" -LocationId $LocationId -Description "Building 2 - 4th Floor Wired Data Subnet"

If you are deploying emergency tracking across an IPv6 network, define the IPv6 prefix accordingly:

Set-CsOnlineLisSubnet -Subnet "2001:db8:acad:45::" -LocationId $LocationId -Description "Building 2 - 4th Floor IPv6 Workstations"

Note that the -Subnet parameter expects the network ID. For standard Class C /24 subnets, supply the network address (e.g. 192.168.45.0). Teams calculates subnet masking based on standard enterprise CIDR conventions configured in your tenant network topology.

Inspecting and Auditing Active LIS Subnets

To review all LIS subnet entries currently provisioned in your Microsoft 365 tenant, use the Get-CsOnlineLisSubnet cmdlet:

Get-CsOnlineLisSubnet | Format-Table Subnet, LocationId, Description

To view detailed diagnostic properties for a specific subnet, run:

Get-CsOnlineLisSubnet -Subnet "192.168.45.0" | Format-List *

To verify which subnets are mapped to a specific office address, perform a join query across locations and subnets:

$AllLocations = Get-CsOnlineLisLocation
Get-CsOnlineLisSubnet | Select-Object Subnet, Description, @{
    Name       = "LocationName"
    Expression = { ($AllLocations | Where-Object { $_.LocationId -eq $_.LocationId }).Location }
} | Format-Table -AutoSize

Updating or Removing LIS Subnet Mappings

When enterprise networks are re-architected or teams relocate between floors, you must update or remove subnet mappings to prevent inaccurate emergency dispatch.

To reassign an existing subnet to a new physical location, execute Set-CsOnlineLisSubnet with the new LocationId:

Set-CsOnlineLisSubnet -Subnet "192.168.45.0" -LocationId $NewLocationId -Description "Building 2 - Reassigned to 5th Floor Lab"

If an IP subnet has been decommissioned from a physical site or replaced by a software-defined WAN (SD-WAN) overlay, remove the mapping using Remove-CsOnlineLisSubnet:

Remove-CsOnlineLisSubnet -Subnet "192.168.45.0" -Confirm:$false

Verifying End-User Client Location Resolution

After creating or modifying LIS subnets, client synchronization can take up to 4 to 24 hours to propagate across Microsoft 365 directory caches.

To test and verify location resolution on an end-user client workstation:

  1. Connect the workstation to the target network subnet (verify via ipconfig or ip addr).
  2. Launch or restart the Microsoft Teams client.
  3. Navigate to the Calls tab.
  4. Look below the dial pad in the bottom-left corner of the interface. The dynamic emergency address should reflect the assigned civic address and sub-location name.
  5. If the location does not appear, click on the address link to trigger a manual refresh, or check client logs located in %appdata%\Microsoft\Teams\logs.txt for LocationServices discovery events.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.