Commands › Microsoft Teams

New-CsAutoAttendant

Microsoft Teams MicrosoftTeams New-*

Create a new Auto Attendant (AA).

Quick start script

# New-CsAutoAttendant — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-MicrosoftTeams -CertificateThumbprint $thumb -ApplicationId $appId -TenantId $tenantId

# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-CsAutoAttendant
$before | Format-List

# 3. Make the change
New-CsAutoAttendant -DefaultCallFlow <Object> -LanguageId <String> -Name <String>

# 4. Verify and diff
$after = Get-CsAutoAttendant
Compare-Object ($before | Out-String) ($after | Out-String)

Syntax

New-CsAutoAttendant -Name <String> -LanguageId <String> -TimeZoneId <String> -DefaultCallFlow <Object> [-CallFlows <Object>] [-CallHandlingAssociations <Object>] [-Operator <Object>] [-VoiceId <String>] [-EnableVoiceResponse] [-EnableMainlineAttendant] [-MainlineAttendantAgentVoiceId <String>] [-InclusionScope <Object>] [-ExclusionScope <Object>] [-AuthorizedUsers <List>] [-HideAuthorizedUsers <List>] [-UserNameExtension <String>] [-AutoRecordingTemplateId <String>] [-SharedVoicemailTriageSettingsTemplateId <String>] [-SpamDetectionTemplateId <string>] [-Tenant <Guid>] [<CommonParameters>]

Parameters (20)

ParameterTypeRequiredWhat it controls
-AuthorizedUsers List This is a list of GUIDs for users who are authorized to make changes to this auto attendant. The users must also have a TeamsVoiceApplications policy assigned. The GUID should contain 32 digits with 4 dashes...
-AutoRecordingTemplateId String The Auto Recording template ID to apply to the Auto attendant.
-CallFlows List The CallFlows parameter represents call flows, which are required if they are referenced in the CallHandlingAssociations parameter.
-CallHandlingAssociations List The CallHandlingAssociations parameter represents the call handling associations. The AA service uses call handling associations to determine which call flow to execute when a specific schedule is in effect.
-DefaultCallFlow Object yes The DefaultCallFlow parameter is the flow to be executed when no other call flow is in effect (for example, during business hours).
-EnableMainlineAttendant SwitchParameter The EnableMainlineAttendant parameter enables Teams Phone Agent (Mainline Attendant) features for this Auto attendant.
-MainlineAttendantAgentVoiceId String The MainlineAttendantAgentVoiceId parameter sets the voice that will be used with Teams Phone Agent (Mainline Attendant).
-EnableVoiceResponse SwitchParameter The EnableVoiceResponse parameter indicates whether voice response for Auto attendant is enabled.
-ExclusionScope Object Specifies the users to which call transfers are not allowed through directory lookup feature. If not specified, no user in the organization is excluded from directory lookup.
-HideAuthorizedUsers List The GUID should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
-InclusionScope Object Specifies the users to which call transfers are allowed through directory lookup feature. If not specified, all users in the organization can be reached through directory lookup.
-LanguageId String yes The LanguageId parameter is the language that is used to read text-to-speech (TTS) prompts.
-Name String yes The Name parameter is a friendly name that is assigned to the AA.
-Operator Object The Operator parameter represents the SIP address or PSTN number of the operator.
-SharedVoicemailTriageSettingsTemplateId String The SharedVoicemailTriageSettingsTemplateId enables automatic triage of Shared Voicemails using a compliant Substrate Large Language Model (LLM). It also specifies which additional LLM‑generated fields are added to...
-SpamDetectionTemplateId String The Spam Detection Template Id to assign to this Teams Phone Agent (Mainline Attendant).
-Tenant Guid This parameter is reserved for Microsoft internal use only.
-TimeZoneId String yes The TimeZoneId parameter represents the AA time zone. All schedules are evaluated based on this time zone.
-UserNameExtension String The UserNameExtension parameter is a string that specifies how to extend usernames in dial search by appending additional information after the name. This parameter is used in dial search when multiple search results...
-VoiceId String The VoiceId parameter represents the voice that is used to read text-to-speech (TTS) prompts.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.