Replace Teams Outbound Caller ID with Resource Account Number

One of the standard PhoneSystem features that Microsoft Teams supports is Caller ID Policies. Masking users direct dials for outbound calls is a pretty common requirement in any organization. Interestingly, when we navigate to the Caller ID Policy, we don’t have a simple option to select a Resource Account number. The use case here, and probably the most common use case, is to mask our outbound calls with the reception number, usually assigned to an Auto Attendant (Check out this article for steps in setting up an Auto Attendant).

For some reason, we still need to set this up via PowerShell. To do this, connect to Microsoft Teams PowerShell, and run the command “Get-CSCallingLineIdentity | fl” to list the Calling Identity Policies in the organization. If there are no custom policies, the you’ll just have the default (Figure 1).

Note: This process requires version 2.3.1 of the Microsoft Teams PowerShell Module

Figure 1: The Default Caller ID Policy

To mask outbound identities, a new policy can be created with the below command:

New-CsCallingLineIdentity  -Identity MaskOutbound -Description "Mask outbound calls with the reception DDI"

The existing policy can also be used if the mask should apply to all users. To set the outbound number to an existing Resource Account, run the commands below, specifying either the newly created policy or the default (Global) policy depending on who you want to target. Make sure to replace “resourceaccount@domain.com with the UPN of the resource account you want to mask with as shown in Figure 2.

$ResourceAccount = Get-CsOnlineApplicationInstance -Identity resourceaccount@domain.com
Set-CsCallingLineIdentity -Identity global -CallingIDSubstitute resource -ResourceAccount $ResourceAccount.ObjectId
Figure 2: Update the Calling ID Policy

If you made the change to a new or custom Calling ID Policy, make sure to apply the policy to your users with the below command:

Grant-CsCallingLineIdentity -Identity "user@domain.com" -PolicyName "Mask Outbound"

Summary

There are a lot of tasks, particularly around Direct Routing that are not possible in the Teams Admin Center so it’s definitely worth getting used to the Teams PowerShell module for this type of thing. The updates to the module have been coming thick and fast lately so make sure to keep it updated too.

9 thoughts on “Replace Teams Outbound Caller ID with Resource Account Number

  1. Hi,

    thank you for sharing this post.
    I already follow every step you wrote including putting the resource number on Global CallingLineIdentity and set EnableUserOverride to false, but OnpremLineURI from user still gets through. Do these steps apply to Direct Routing, too?

    Best Regards,
    Gabriel

    Like

    1. Gabriel Wishnu

      Nevermind my question. I forgot to set ForwardPAI to $false. Now it is working like a charm.

      Thank you very much

      Like

  2. Christian

    Hi Sean, do you know if it’s possible to use outbound caller id in combination with direct routing? We have the SBC hosted by a third party, so if it is possible to do that, I would be able to set it up for particular users in our organization without having to create a support ticket with them.

    Like

      1. Christian Nagelkerke

        Hi Sean,
        I didn’t notice the typo at first, I got it working now. Thanks for your help!

        Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s