Ensuring compliance with emergency dispatch regulations such as the RAY BAUM’S Act in the United States and comparable public safety mandates globally is a primary responsibility for enterprise telephony administrators. When an on-premises employee dials an emergency number (such as 911 or 112) using Microsoft Teams Phone from a desktop PC, IP desk phone, or Teams Rooms system, first responders must receive precise physical location details indicating the caller’s exact building, floor, and office space.
In wired campus environments where desktops connect directly to wall ethernet jacks, network switches serve as the primary network infrastructure element. Through Link Layer Discovery Protocol (LLDP) and Cisco Discovery Protocol (CDP), the Microsoft Teams client detects the Chassis ID of the physical access layer switch to which the computer is connected. By mapping these switch Chassis IDs directly to pre-validated emergency locations using the CsOnlineLisSwitch cmdlets in PowerShell, Microsoft Teams Phone administrators ensure automatic and highly reliable emergency location resolution across corporate facilities.
Architecture of Switch-Based Dynamic Emergency Calling
The Microsoft Teams Location Information Service (LIS) resolves physical caller location based on network topology data collected by client endpoints. The network mapping hierarchy evaluates network parameters in a strictly defined order:
- Network Switch Port (
CsOnlineLisPort): Identifies the exact physical ethernet port (e.g. GigabitEthernet1/0/24) on a switch. Provides room-level precision. - Network Switch Chassis (
CsOnlineLisSwitch): Identifies the entire physical access switch. Typically corresponds to a specific wiring closet, floor, or building wing. - Wireless Access Point (
CsOnlineLisWirelessAccessPoint): Identifies the Wi-Fi BSSID for wireless callers. - IP Subnet (
CsOnlineLisSubnet): Maps IPv4/IPv6 subnets to broader building locations.
Mapping network switches at the chassis level offers an optimal balance between administrative effort and location granularity. Because enterprise access switches typically serve a single floor or localized cluster of office cubicles, mapping the switch chassis ensures that even if individual switch port records are unmaintained, wired calls immediately resolve to the correct floor and wiring zone.
Connecting to the Microsoft Teams PowerShell Module
Managing the LIS database requires an administrative account with Teams Administrator or Global Administrator privileges and the Microsoft Teams PowerShell module (version 4.0.0 or later).
Launch an elevated PowerShell session and connect to your tenant:
# Install or update the Microsoft Teams module
Install-Module -Name MicrosoftTeams -Force -AllowClobber
# Authenticate to the tenant
Connect-MicrosoftTeams
Identifying Switch Chassis IDs and Location Identifiers
A switch Chassis ID in LLDP/CDP is formatted as a standardized MAC address (e.g. 00-1B-D7-89-0A-11 or 00:1B:D7:89:0A:11) or an IP/text identifier. In Microsoft Teams LIS, Chassis IDs must be formatted using hyphen-separated or colon-separated hexadecimal notation.
To obtain switch Chassis IDs, query your network management system (such as Cisco DNA Center / Catalyst Center, Aruba AirWave, or CLI console via show lldp local-information).
Next, query the Teams LIS database to retrieve the unique LocationId GUID representing the target physical location:
Get-CsOnlineLisLocation | Format-Table LocationId, Location, CivicAddressId, CompanyName
Filter for the specific floor or building wing:
$TargetLoc = Get-CsOnlineLisLocation | Where-Object { $_.Location -like "*Floor 3 - Engineering Lab*" }
$LocationId = $TargetLoc.LocationId
$LocationId
Creating LIS Switch Associations with Set-CsOnlineLisSwitch
In Microsoft Teams PowerShell, the Set-CsOnlineLisSwitch cmdlet creates new switch mappings or updates existing entries.
To associate a physical switch Chassis ID with the designated location, run:
Set-CsOnlineLisSwitch `
-ChassisId "00-1B-D7-89-0A-11" `
-LocationId $LocationId `
-Description "IDF-Floor3-Switch-01"
If you have multiple stacked switches in an IDF (Intermediate Distribution Frame) operating as a single logical switch stack, map the virtual stack master Chassis ID, or map each individual switch unit Chassis ID to the same physical location:
$SwitchStackChassis = @(
"00-1B-D7-89-0A-11",
"00-1B-D7-89-0A-12",
"00-1B-D7-89-0A-13"
)
foreach ($Chassis in $SwitchStackChassis) {
Set-CsOnlineLisSwitch -ChassisId $Chassis -LocationId $LocationId -Description "IDF-Floor3-StackUnit"
}
Bulk Importing Network Switches from CSV
For enterprise campuses with dozens of wiring closets and hundreds of access switches, bulk provisioning via CSV ensures rapid and accurate deployment.
Create a CSV file (e.g. C:\LisData\Switches.csv) containing the following column structure:
ChassisId,LocationId,Description
00-1B-D7-89-0A-11,c1d2e3f4-a5b6-7890-bcde-fa1234567890,Building 4 - IDF 1 - Floor 1
00-1B-D7-89-0A-21,d2e3f4a5-b6c7-8901-cdef-ab2345678901,Building 4 - IDF 2 - Floor 2
00-1B-D7-89-0A-31,e3f4a5b6-c7d8-9012-defa-bc3456789012,Building 4 - IDF 3 - Floor 3
Run the bulk import script in PowerShell:
$Switches = Import-Csv -Path "C:\LisData\Switches.csv"
foreach ($Switch in $Switches) {
Write-Host "Provisioning Switch Chassis: $($Switch.ChassisId)"
Set-CsOnlineLisSwitch -ChassisId $Switch.ChassisId -LocationId $Switch.LocationId -Description $Switch.Description
}
Inspecting and Auditing Active LIS Switch Configurations
To view all switch chassis mappings currently active in your Microsoft 365 tenant, execute:
Get-CsOnlineLisSwitch | Format-Table ChassisId, LocationId, Description
To inspect a single switch record in detail:
Get-CsOnlineLisSwitch -ChassisId "00-1B-D7-89-0A-11" | Format-List *
To cross-reference switch chassis entries with their human-readable civic address and location names:
$AllLocations = Get-CsOnlineLisLocation
Get-CsOnlineLisSwitch | Select-Object ChassisId, Description, @{
Name = "ResolvedLocation"
Expression = { ($AllLocations | Where-Object { $_.LocationId -eq $_.LocationId }).Location }
} | Format-Table -AutoSize
Modifying and Removing LIS Switch Records
When switches are decommissioned or relocated to different wiring closets, update the LIS database promptly to prevent inaccurate dispatch information.
To reassign an existing switch to a different location:
Set-CsOnlineLisSwitch -ChassisId "00-1B-D7-89-0A-11" -LocationId $NewLocationId -Description "Relocated to Building 2 - Floor 1"
To permanently delete a retired switch record:
Remove-CsOnlineLisSwitch -ChassisId "00-1B-D7-89-0A-11" -Confirm:$false
Testing Client Location Detection on Wired Endpoints
Allow up to 4 to 24 hours for newly provisioned LIS records to replicate across Microsoft 365 services.
To verify location detection on a wired workstation:
- Connect the workstation via ethernet to an access switch port. Ensure LLDP or CDP is enabled on the network switch.
- On Windows, verify that the Link-Layer Topology Discovery Responder protocol is enabled on the network adapter.
- Launch or restart the Microsoft Teams desktop client.
- Navigate to the Calls tab. Below the dial pad, the dynamic emergency location should display the civic address and floor mapped to the connected switch chassis.
- If the location does not appear, check the Teams client diagnostic log (press
Ctrl + Alt + Shift + 1) and search the extracted text file forChassisIdto verify whether the client successfully received LLDP discovery packets from the local switch.