Public/generated/Get-KriticalUtcmTeamsOnlineVoicemailUserSettings.ps1

# Kritical.PS.UTCM | Microsoft Graph UTCM REST API toolkit
# (c) 2026 Kritical Pty Ltd | https://kritical.net
# Kritical brand banner is rendered at module load via Write-KriticalUtcmBanner.

function Get-KriticalUtcmTeamsOnlineVoicemailUserSettings {
<#
.SYNOPSIS
    Kritical.UTCM shim for M365DSC resource TeamsOnlineVoicemailUserSettings.

.DESCRIPTION

    Search-replace safe: callers that today invoke
        Get-M365DSCTeamsOnlineVoicemailUserSettings -Credential $cred -TenantId $tid
    can rename to
        Get-KriticalUtcmTeamsOnlineVoicemailUserSettings -Credential $cred -TenantId $tid
    with ZERO other edits. Parameter shape matches the M365DSC .schema.mof
    exactly. By default -PreferM365DscBehavior is true.

    Actual Graph dispatch is delegated to Invoke-KriticalUtcmM365DscSchemaBridge.
    Bridge maps resource → Graph endpoint per per-resource wave; where mapping
    is not yet shipped, bridge returns an object with Verdict='UNMAPPED'.

.NOTES
    Workload: Teams
    Param count: 19
#>

[CmdletBinding()]
param(
        # The Identity parameter represents the ID of the specific user in your organization; this can be either a SIP URI or an Object ID.
[Parameter(Mandatory)] [string]$Identity,
        # The CallAnswerRule parameter represents the value of the call answer rule, which can be any of the following: DeclineCall, PromptOnly, PromptOnlyWithTransfer, RegularVoicemail, VoicemailWithTransferOption.
[ValidateSet('DeclineCall','PromptOnly','PromptOnlyWithTransfer','RegularVoicemail','VoicemailWithTransferOption')] [string]$CallAnswerRule,
        # The DefaultGreetingPromptOverwrite parameter represents the contents that overwrite the default normal greeting prompt. If the user's normal custom greeting is not set and DefaultGreetingPromptOverwrite is not empty, the voicemail service will play this overwrite greeting instead of the default normal greeting in the voicemail deposit scenario.
[string]$DefaultGreetingPromptOverwrite,
        # The DefaultOofGreetingPromptOverwrite parameter represents the contents that overwrite the default out-of-office greeting prompt. If the user's out-of-office custom greeting is not set and DefaultOofGreetingPromptOverwrite is not empty, the voicemail service will play this overwrite greeting instead of the default out-of-office greeting in the voicemail deposit scenario.
[string]$DefaultOofGreetingPromptOverwrite,
        # The OofGreetingEnabled parameter represents whether to play out-of-office greeting in voicemail deposit scenario.
[bool]$OofGreetingEnabled,
        # The OofGreetingFollowAutomaticRepliesEnabled parameter represents whether to play out-of-office greeting in voicemail deposit scenario when user set automatic replies in Outlook.
[bool]$OofGreetingFollowAutomaticRepliesEnabled,
        # The OofGreetingFollowCalendarEnabled parameter represents whether to play out-of-office greeting in voicemail deposit scenario when user set out-of-office in calendar.
[bool]$OofGreetingFollowCalendarEnabled,
        # The PromptLanguage parameter represents the language that is used to play voicemail prompts.
[string]$PromptLanguage,
        # Specifies whether voicemail and transcription data is shared with the service for training and improving accuracy.
[bool]$ShareData,
        # The TransferTarget parameter represents the target to transfer the call when call answer rule set to PromptOnlyWithTransfer or VoicemailWithTransferOption. Value of this parameter should be a SIP URI of another user in your organization. For user with Enterprise Voice enabled, a valid telephone number could also be accepted as TransferTarget.
[string]$TransferTarget,
        # The VoicemailEnabled parameter represents whether to enable voicemail service. If set to $false, the user has no voicemail service.
[bool]$VoicemailEnabled,
        # Present ensures the policy exists, absent ensures it is removed.
[ValidateSet('Present','Absent')] [string]$Ensure,
        # Credentials of the Teams Global Admin.
[string]$Credential,
        # Id of the Azure Active Directory application to authenticate with.
[string]$ApplicationId,
        # Name of the Azure Active Directory tenant used for authentication. Format contoso.onmicrosoft.com
[string]$TenantId,
        # Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.
[string]$CertificateThumbprint,
        # Username can be made up to anything but password will be used for CertificatePassword
[string]$CertificatePassword,
        # Path to certificate used in service principal usually a PFX file.
[string]$CertificatePath,
        # Managed ID being used for authentication.
[bool]$ManagedIdentity
)
    Invoke-KriticalUtcmM365DscSchemaBridge -ResourceName 'TeamsOnlineVoicemailUserSettings' -Workload 'Teams' -Verb 'Get' -CallerParams $PSBoundParameters
}