Skip to content

TeamsAutoAttendant

Parameters

Parameter Attribute DataType Description Allowed Values
Name Key String The friendly name of the auto attendant.
LanguageId Write String The language used to read text-to-speech prompts, for example en-US. Required when the auto attendant is created.
VoiceId Write String The voice used to read text-to-speech prompts, for example Female or Male.
TimeZoneId Write String The time zone every schedule of the auto attendant is evaluated in, for example Pacific Standard Time. Required when the auto attendant is created.
EnableVoiceResponse Write Boolean Indicates whether callers can answer the auto attendant by voice.
DefaultCallFlow Write MSFT_TeamsAutoAttendantCallFlow The call flow executed when no other call flow is in effect, for example during business hours. Required when the auto attendant is created.
CallFlows Write MSFT_TeamsAutoAttendantCallFlow[] The call flows referenced by the call handling associations.
CallHandlingAssociations Write MSFT_TeamsAutoAttendantCallHandlingAssociation[] The associations that decide which call flow runs while a schedule is in effect.
Operator Write MSFT_TeamsAutoAttendantCallableEntity The operator callers are transferred to.
InclusionScopeGroupIds Write String[] The ids of the groups whose members are reachable through directory search. When empty, every user of the organization is reachable.
ExclusionScopeGroupIds Write String[] The ids of the groups whose members are not reachable through directory search.
AuthorizedUsers Write String[] The user principal names of the users authorized to make changes to the auto attendant. The users need a TeamsVoiceApplications policy.
HideAuthorizedUsers Write String[] The user principal names of the authorized users hidden from the Teams client.
UserNameExtension Write String The information appended to user names in dial by name search results to tell users with the same name apart. None, Office, Department
EnableMainlineAttendant Write Boolean Indicates whether Mainline Attendant is enabled. The auto attendant needs a resource account.
MainlineAttendantAgentVoiceId Write String The voice used by Mainline Attendant. Alloy, Echo, Shimmer
ApplicationInstances Write String[] The user principal names of the resource accounts associated with the auto attendant.
Ensure Write String Specify if the auto attendant should exist. Present, Absent
Credential Write PSCredential Credentials of the Teams Admin
ApplicationId Write String Id of the Entra ID application to authenticate with.
TenantId Write String Id of the Entra ID tenant used for authentication.
CertificateThumbprint Write String Thumbprint of the Entra ID application's authentication certificate to use for authentication.
ManagedIdentity Write Boolean Managed ID being used for authentication.
AccessTokens Write String[] Access token used for authentication.

Embedded Instances

MSFT_TeamsAutoAttendantCallFlow

Parameters

Parameter Attribute DataType Description Allowed Values
Name Required String The name of the call flow. Call handling associations reference the call flow by this name.
Greetings Write MSFT_TeamsAutoAttendantPrompt[] The greetings played when the call flow starts.
Menu Write MSFT_TeamsAutoAttendantMenu The menu of the call flow.
ForceListenMenuEnabled Write Boolean Indicates whether callers have to listen to the whole menu before they can make a selection.
RingResourceAccountDelegates Write Boolean Indicates whether calls ring the delegates of the resource account.

MSFT_TeamsAutoAttendantCallHandlingAssociation

Parameters

Parameter Attribute DataType Description Allowed Values
Type Write String The type of the association. AfterHours, Holiday
ScheduleName Required String The name of the schedule that activates the call flow. Manage the schedule with the TeamsOnlineSchedule resource.
CallFlowName Write String The name of the call flow that runs while the schedule is in effect. It references an entry of CallFlows.
Enabled Write Boolean Indicates whether the association is enabled.

MSFT_TeamsAutoAttendantCallableEntity

Parameters

Parameter Attribute DataType Description Allowed Values
Identity Required String The target. A user principal name for the types User and ApplicationEndpoint, a tel URI for ExternalPstn and an object id otherwise.
Type Required String The type of the target. User, OrganizationalAutoAttendant, HuntGroup, ApplicationEndpoint, ExternalPstn, SharedVoicemail, ConfigurationEndpoint, Voicemail
EnableTranscription Write Boolean Indicates whether voicemail left for a shared voicemail target is transcribed.
EnableSharedVoicemailSystemPromptSuppression Write Boolean Indicates whether the system prompt of a shared voicemail target is suppressed.
CallPriority Write SInt32 The priority of calls transferred to the target, from 1 (highest) to 5 (lowest).

MSFT_TeamsAutoAttendantPrompt

Parameters

Parameter Attribute DataType Description Allowed Values
ActiveType Write String The type of the prompt that is played. None, TextToSpeech, AudioFile
TextToSpeechPrompt Write String The text read to callers.
AudioFilePromptId Write String The id of an audio file already uploaded for auto attendants.
AudioFilePromptFileName Write String The file name of the audio file.

MSFT_TeamsAutoAttendantMenu

Parameters

Parameter Attribute DataType Description Allowed Values
Name Write String The name of the menu.
Prompts Write MSFT_TeamsAutoAttendantPrompt[] The prompts played when the menu is read to callers.
MenuOptions Write MSFT_TeamsAutoAttendantMenuOption[] The options callers can choose from.
EnableDialByName Write Boolean Indicates whether callers can search the directory.
DirectorySearchMethod Write String The method used to search the directory. None, ByName, ByExtension

MSFT_TeamsAutoAttendantMenuOption

Parameters

Parameter Attribute DataType Description Allowed Values
Action Write String The action taken when the option is selected. TransferCallToOperator, DisconnectCall, TransferCallToTarget, Announcement, MainlineAttendantFlow, AgentsAndQueues
DtmfResponse Required String The key callers press to select the option. Tone0, Tone1, Tone2, Tone3, Tone4, Tone5, Tone6, Tone7, Tone8, Tone9, ToneStar, TonePound, Automatic
VoiceResponses Write String[] The phrases callers say to select the option when voice response is enabled.
CallTarget Write MSFT_TeamsAutoAttendantCallableEntity The target calls are transferred to when the action is TransferCallToTarget.
Prompt Write MSFT_TeamsAutoAttendantPrompt The prompt played when the action is Announcement.
Description Write String The description of the option.
MainlineAttendantTarget Write String The Mainline Attendant flow the option runs.
AgentTargetType Write String The type of the agent target. Ivr, CoPilot
AgentTarget Write String The agent target of the option.
AgentTargetTagTemplateId Write String The id of the tag template of the agent target.

Description

This resource configures a Teams Auto Attendant, including its call flows, call handling associations and resource accounts.

Permissions

Examples

Example 1

This example is used to test new resources and showcase the usage of new resources being worked on. It is not meant to use as a production baseline.

Configuration Example
{
    param
    (
        [Parameter()]
        [System.String]
        $ApplicationId,

        [Parameter()]
        [System.String]
        $TenantId,

        [Parameter()]
        [System.String]
        $CertificateThumbprint
    )

    Import-DscResource -ModuleName Microsoft365DSC

    Node localhost
    {
        TeamsAutoAttendant 'TeamsAutoAttendant-Example'
        {
            Name                          = "Contoso Main Line"
            LanguageId                    = "en-US"
            VoiceId                       = "Female"
            TimeZoneId                    = "Pacific Standard Time"
            EnableVoiceResponse           = $true
            DefaultCallFlow               = MSFT_TeamsAutoAttendantCallFlow{
                Name                         = "Contoso Business Hours Call Flow"
                Greetings                    = @(
                    MSFT_TeamsAutoAttendantPrompt{
                        ActiveType         = "TextToSpeech"
                        TextToSpeechPrompt = "Thank you for calling Contoso."
                    }
                )
                Menu                         = MSFT_TeamsAutoAttendantMenu{
                    Name                  = "Business hours menu"
                    Prompts               = @(
                        MSFT_TeamsAutoAttendantPrompt{
                            ActiveType         = "TextToSpeech"
                            TextToSpeechPrompt = "For reception, press 1. For sales, press 2. For our address, press 3. To reach the operator, press 0."
                        }
                    )
                    MenuOptions           = @(
                        MSFT_TeamsAutoAttendantMenuOption{
                            DtmfResponse   = "Tone1"
                            Action         = "TransferCallToTarget"
                            VoiceResponses = @("Reception")
                            Description    = "Reception"
                            CallTarget     = MSFT_TeamsAutoAttendantCallableEntity{
                                Identity = "AdeleV@$TenantId"
                                Type     = "User"
                            }
                        }
                        MSFT_TeamsAutoAttendantMenuOption{
                            DtmfResponse   = "Tone2"
                            Action         = "TransferCallToTarget"
                            VoiceResponses = @("Sales")
                            Description    = "Sales"
                            CallTarget     = MSFT_TeamsAutoAttendantCallableEntity{
                                Identity     = "salesqueue@$TenantId"
                                Type         = "ApplicationEndpoint"
                                CallPriority = 2
                            }
                        }
                        MSFT_TeamsAutoAttendantMenuOption{
                            DtmfResponse   = "Tone3"
                            Action         = "Announcement"
                            VoiceResponses = @("Address")
                            Description    = "Office address"
                            Prompt         = MSFT_TeamsAutoAttendantPrompt{
                                ActiveType         = "TextToSpeech"
                                TextToSpeechPrompt = "Our office is located at 1 Microsoft Way, Redmond, Washington."
                            }
                        }
                        MSFT_TeamsAutoAttendantMenuOption{
                            DtmfResponse   = "Tone0"
                            Action         = "TransferCallToOperator"
                            Description    = "Operator"
                        }
                    )
                    EnableDialByName      = $true
                    DirectorySearchMethod = "ByName"
                }
                ForceListenMenuEnabled       = $false
                RingResourceAccountDelegates = $false
            }
            CallFlows                     = @(
                MSFT_TeamsAutoAttendantCallFlow{
                    Name                         = "Contoso After Hours Call Flow"
                    Greetings                    = @(
                        MSFT_TeamsAutoAttendantPrompt{
                            ActiveType         = "TextToSpeech"
                            TextToSpeechPrompt = "Thank you for calling Contoso. Our offices are open Monday to Friday from 9 AM to 5 PM Pacific time."
                        }
                    )
                    Menu                         = MSFT_TeamsAutoAttendantMenu{
                        Name                  = "After hours menu"
                        MenuOptions           = @(
                            MSFT_TeamsAutoAttendantMenuOption{
                                DtmfResponse = "Automatic"
                                Action       = "DisconnectCall"
                            }
                        )
                        EnableDialByName      = $false
                        DirectorySearchMethod = "None"
                    }
                    ForceListenMenuEnabled       = $false
                    RingResourceAccountDelegates = $false
                }
            )
            CallHandlingAssociations      = @(
                MSFT_TeamsAutoAttendantCallHandlingAssociation{
                    Type         = "AfterHours"
                    ScheduleName = "Contoso Business Hours"
                    CallFlowName = "Contoso After Hours Call Flow"
                    Enabled      = $true
                }
            )
            Operator                      = MSFT_TeamsAutoAttendantCallableEntity{
                Identity = "AdeleV@$TenantId"
                Type     = "User"
            }
            AuthorizedUsers               = @("AlexW@$TenantId", "MeganB@$TenantId")
            HideAuthorizedUsers           = @("MeganB@$TenantId")
            UserNameExtension             = "Department"
            EnableMainlineAttendant       = $false
            MainlineAttendantAgentVoiceId = "Alloy"
            ApplicationInstances          = @("mainline@$TenantId")
            Ensure                        = "Present"
            ApplicationId                 = $ApplicationId
            TenantId                      = $TenantId
            CertificateThumbprint         = $CertificateThumbprint
        }
    }
}

Example 2

This example is used to test new resources and showcase the usage of new resources being worked on. It is not meant to use as a production baseline.

Configuration Example
{
    param
    (
        [Parameter()]
        [System.String]
        $ApplicationId,

        [Parameter()]
        [System.String]
        $TenantId,

        [Parameter()]
        [System.String]
        $CertificateThumbprint
    )

    Import-DscResource -ModuleName Microsoft365DSC

    Node localhost
    {
        TeamsAutoAttendant 'TeamsAutoAttendant-Example'
        {
            Name                          = "Contoso Main Line"
            LanguageId                    = "en-US"
            VoiceId                       = "Male" # Updated Property
            TimeZoneId                    = "Pacific Standard Time"
            EnableVoiceResponse           = $true
            DefaultCallFlow               = MSFT_TeamsAutoAttendantCallFlow{
                Name                         = "Contoso Business Hours Call Flow"
                Greetings                    = @(
                    MSFT_TeamsAutoAttendantPrompt{
                        ActiveType         = "TextToSpeech"
                        TextToSpeechPrompt = "Thank you for calling Contoso."
                    }
                )
                Menu                         = MSFT_TeamsAutoAttendantMenu{
                    Name                  = "Business hours menu"
                    Prompts               = @(
                        MSFT_TeamsAutoAttendantPrompt{
                            ActiveType         = "TextToSpeech"
                            TextToSpeechPrompt = "For reception, press 1. For sales, press 2. For our address, press 3. To reach the operator, press 0."
                        }
                    )
                    MenuOptions           = @(
                        MSFT_TeamsAutoAttendantMenuOption{
                            DtmfResponse   = "Tone1"
                            Action         = "TransferCallToTarget"
                            VoiceResponses = @("Reception")
                            Description    = "Reception"
                            CallTarget     = MSFT_TeamsAutoAttendantCallableEntity{
                                Identity = "AdeleV@$TenantId"
                                Type     = "User"
                            }
                        }
                        MSFT_TeamsAutoAttendantMenuOption{
                            DtmfResponse   = "Tone2"
                            Action         = "TransferCallToTarget"
                            VoiceResponses = @("Sales")
                            Description    = "Sales"
                            CallTarget     = MSFT_TeamsAutoAttendantCallableEntity{
                                Identity     = "salesqueue@$TenantId"
                                Type         = "ApplicationEndpoint"
                                CallPriority = 2
                            }
                        }
                        MSFT_TeamsAutoAttendantMenuOption{
                            DtmfResponse   = "Tone3"
                            Action         = "Announcement"
                            VoiceResponses = @("Address")
                            Description    = "Office address"
                            Prompt         = MSFT_TeamsAutoAttendantPrompt{
                                ActiveType         = "TextToSpeech"
                                TextToSpeechPrompt = "Our office is located at 1 Microsoft Way, Redmond, Washington."
                            }
                        }
                        MSFT_TeamsAutoAttendantMenuOption{
                            DtmfResponse   = "Tone0"
                            Action         = "TransferCallToOperator"
                            Description    = "Operator"
                        }
                    )
                    EnableDialByName      = $true
                    DirectorySearchMethod = "ByName"
                }
                ForceListenMenuEnabled       = $false
                RingResourceAccountDelegates = $false
            }
            CallFlows                     = @(
                MSFT_TeamsAutoAttendantCallFlow{
                    Name                         = "Contoso After Hours Call Flow"
                    Greetings                    = @(
                        MSFT_TeamsAutoAttendantPrompt{
                            ActiveType         = "TextToSpeech"
                            TextToSpeechPrompt = "Thank you for calling Contoso. Our offices are open Monday to Friday from 9 AM to 5 PM Pacific time."
                        }
                    )
                    Menu                         = MSFT_TeamsAutoAttendantMenu{
                        Name                  = "After hours menu"
                        MenuOptions           = @(
                            MSFT_TeamsAutoAttendantMenuOption{
                                DtmfResponse = "Automatic"
                                Action       = "DisconnectCall"
                            }
                        )
                        EnableDialByName      = $false
                        DirectorySearchMethod = "None"
                    }
                    ForceListenMenuEnabled       = $false
                    RingResourceAccountDelegates = $false
                }
            )
            CallHandlingAssociations      = @(
                MSFT_TeamsAutoAttendantCallHandlingAssociation{
                    Type         = "AfterHours"
                    ScheduleName = "Contoso Business Hours"
                    CallFlowName = "Contoso After Hours Call Flow"
                    Enabled      = $true
                }
            )
            Operator                      = MSFT_TeamsAutoAttendantCallableEntity{
                Identity = "AdeleV@$TenantId"
                Type     = "User"
            }
            AuthorizedUsers               = @("AlexW@$TenantId", "MeganB@$TenantId")
            HideAuthorizedUsers           = @("MeganB@$TenantId")
            UserNameExtension             = "Department"
            EnableMainlineAttendant       = $false
            MainlineAttendantAgentVoiceId = "Alloy"
            ApplicationInstances          = @("mainline@$TenantId")
            Ensure                        = "Present"
            ApplicationId                 = $ApplicationId
            TenantId                      = $TenantId
            CertificateThumbprint         = $CertificateThumbprint
        }
    }
}

Example 3

This example is used to test new resources and showcase the usage of new resources being worked on. It is not meant to use as a production baseline.

Configuration Example
{
    param
    (
        [Parameter()]
        [System.String]
        $ApplicationId,

        [Parameter()]
        [System.String]
        $TenantId,

        [Parameter()]
        [System.String]
        $CertificateThumbprint
    )

    Import-DscResource -ModuleName Microsoft365DSC

    Node localhost
    {
        TeamsAutoAttendant 'TeamsAutoAttendant-Example'
        {
            Name                  = "Contoso Main Line"
            Ensure                = "Absent"
            ApplicationId         = $ApplicationId
            TenantId              = $TenantId
            CertificateThumbprint = $CertificateThumbprint
        }
    }
}