Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Important
Teams Phone Agent is now generally available.
Book a Teams Phone Agent Discovery Session to learn what Teams Phone Agent does, how it fits your organization, and how to plan your deployment. We can also help you work through setup and configuration questions. Teams Phone Agent Discovery Sessions
Help shape the product by filling out our feedback form or by sending us an email
This article is for IT pros and Teams administrators who want to configure spam detection for teams phone agent calls.
Planning and licensing review
Planning
- Overview of Teams Phone Agent, Auto Attendant, and Call Queue
- Questions and Answers
- Appointment
- Agents and queues
- Recording calls
- Templates and resources
- Nested call flows
- Reporting considerations
- Design call flows
- Getting started
Licensing
Known issues
None.
What's new in Teams Phone Agent (last six months)
- Setember 30, 2026
- Teams Phone Agent is now generally available to all customers.
- Automatic Recording for Teams Phone Agent can be configured in Teams admin center.
- Maximum call length with configurable disconnect message can be configured in Teams admin center.
- Question and Answers URLs are refreshed daily.
- September 29, 2026
- Historical reporting for Teams Phone Agent updated.
- September 1, 2026
- August 31, 2026
- AI disclaimer can be configured in Teams admin center.
- Maximum call length can be configured in Teams admin center.
- August 17, 2026
- Automatic Recording for Teams Phone Agent can be configured via PowerShell.
- August 12, 2026
- Spam detection can be configured via PowerShell.
- AI disclaimer customization can be configured via PowerShell.
- Maximum call length can be configured in PowerShell.
- July 20, 2026
- Historical reporting for Teams Phone Agent is now available.
- June 15, 2026
- Entered Frontier Public Preview
Spam detection templates for Teams Phone Agent
Each spam detection template for Teams Phone Agent requires that the following items be configured:
Name
The name of the template.
Description
A description for the template.
Enable spam detection
Enable or disable spam detection.
Action
The action Teams Phone Agent should take when it determines the call is spam.
Supported values: DisconnectCall | TransferCallToOperator | TransferCallToTarget
- DisconnectCall - the call will be disconnected.
- TransferCallToOperator - the call will be transferred to the configured operator. If no operator has been configured, the call will be disconnected.
- TransferCallToTarget - the call will be transferred to the target defined by the -CallTarget parameter.
Target
The call target when -Action is set to TransferCallToTarget.
Exclusion scope
A list of e.164 formatted phone numbers that will never be considered as spam.
Inclusion scope
A list of e.164 formatted phone numbers that will always be considered as spam.
PowerShell examples
Spam detection for Teams Phone Agent is currently configured through PowerShell only. Configuration in the Teams admin center is coming soon.
Expand to see PowerShell examples
Microsoft Teams PowerShell module 7.9.1-preview or later is required.
Example 1
Create a new spam detection template that disconnects calls determined to be spam
New-CsMainlineAttendantSpamDetectionTemplate -Name "Spam Detection - Disconnect" -Description "Calls determined to be spam will be disconnected" -EnableSpamDetection $true -Action "DisconnectCall"
Example 2
Create a new spam detection template that transfers calls determined to be spam to the operator
New-CsMainlineAttendantSpamDetectionTemplate -Name "Spam Detection - Disconnect" -Description "Calls determined to be spam will be disconnected" -EnableSpamDetection $true -Action "TransferCallToOperator"
Note
Configure an Operator for the Teams Phone Agent. If no operator is configured, the Teams Phone Agent disconnects the call.
Example 3
Create a spam detection template that never classifies calls from the CEO as spam
New-CsMainlineAttendantSpamDetectionTemplate -Name "Spam Detection - Disconnect - Except CEO" -Description "Except CEO - Calls determined to be spam will be disconnected" -EnableSpamDetection $true -Action "DisconnectCall" -ExclusionScope @("+14255551212")
Assign a spam detection template to a Teams Phone Agent
To assign an existing spam detection template to a Teams Phone Agent
Get-CsMainlineAttendantSpamDetectionTemplate
A list of existing spam detection templates is returned. Each template has a unique ID.
$tpa=Get-CsAutoAttendant -Identity <TeamsPhoneAgentGUID>
$tpa.SpamDetectionTemplateId = <ID from above>
Set-CsAutoAttendant -Instance $tpa
There are two ways to get the TeamsPhoneAgentGUID:
Edit the Teams Phone Agent in the Teams admin center. The GUID is in the URL:
https://admin.teams.microsoft.com/auto-attendants/v2/6d0713c0-d800-49aa-8a97-a2d868e0d112Use
Get-CsAutoAttendant | Select-Object Identity, Nameto list the first 100 Teams Phone Agents and Auto Attendants. To list more, see Get-CsAutoAttendant.