Teams

Microsoft Teams – Routing calls to unassigned numbers

A new feature has turned up today in Microsoft Teams – the long awaited ability to route unassigned numbers. This was available in Skype for Business On-premises, and is great for misdials or when someone departs the firm, their calls can be sent to someone else, such as reception. There’s no ongoing work or maintenance required either, once a number is unassigned, it can be picked up by these rules.

The documentation is light at the moment and it’s in preview, but it does work. Note that I’ll cover the call redirect option, but there’s also an option to redirect calls to a pre-recorded message in WAV format.

First, make sure your MicrosoftTeams PowerShell module is at least 2.5.1. The latest live version at the time of writing is 2.6.0 so you don’t need to worry about preview module versions – just the PowerShell command:

Update-Module Microsoft Teams

will update. You can check the version afterwards with this command:

Get-Module MicrosoftTeams | Format-Table Name,Version

Once your MicrosoftTeams module is up to date, and if you’re redirecting the call to a user, auto attendant or calling group, you’ll first need to get the ObjectID. Here’s Microsoft’s example for a resource account:

$RAObjectId = (Get-CsOnlineApplicationInstance -Identity [email protected]).ObjectId

However, if you’re redirecting to a normal user account, use this command instead:

$UserObjectId = (Get-CsOnlineUser -Identity [email protected]).ObjectId

Once you have the $UserObjectID value set, it’s time to create the Unassigned Number Treatment. The possible options for this command are documented here and again here’s an example:

New-CsTeamsUnassignedNumberTreatment -Identity Unassigned1 -Pattern "^\+618xxxxxx\d{2}$" -TargetType User -Target $UserObjectId -TreatmentPriority 2

I’ll break down a few of these values.

Identity: This needs to be a unique value for the treatment and can be a descriptive name.

Pattern: This is where you define the number pattern. In my example above, I’m wanting the number to match what I’ve defined up to the last two digits, which can be anything.

TargetType: This needs to be defined as User, ResourceAccount or Announcement for the Target.

Target: This is the ObjectID from the first command.

TreatmentPriority: This needs to be a unique number for each treatment, and has an order preference in case of overlap in rules. I’m using 2 above purely because it’s the second one, and have no plans on overlapping rules.

Once the New-CsTeamsUnassignedNumberTreatment command has completed, it won’t apply immediately – in my testing it took roughly 15 minutes.

I’m really glad this feature is now available – and I expect others have also been waiting for it to be available, or weren’t aware it was even an option.

Safe Links now in Microsoft Teams

Microsoft announced that safe links are now Generally Available in Microsoft Teams. This is the same idea of Safe Links for email, and if you already have that on, enabling it for Teams is easy.

I won’t rehash all the details Microsoft have above, but Safe Links give a time of click assessment of a URL to check if they deem it safe. This can be better than time of delivery of the URL, as new threats emerge or the end results of the URL change.

To enable Safe Links for Teams, go to the Safe Links Policies & rules section of Microsoft 365 Defender https://security.microsoft.com/safelinksv2

From here, you probably just have one policy but could have more – edit the policy to affect the users you want, and in the “Protection settings” area, there will be an “Edit protection settings” link

Once editing, just set the radio button to ‘on’ against ‘Select the action for unknown or potentially malicious URLs within Microsoft Teams. Microsoft haven’t updated the warning around being in preview despite the GA announcement.

Once done, and waiting for a timeframe I’m not sure on, Teams will start using Safe Links. URLs being used in Teams look the same as before, and even if you hover over them, they show the actual end result link:

But when clicked, you’ll see this jump page while Microsoft Defender for Office 365 verifies the link:

Regardless of the link being clicked, the URL for me always displayed this:

https://statics.teams.cdn.office.net/evergreen-assets/safelinks/1/atp-safelinks.html

It verified the link very quickly in my testing, less than a second each time. At this stage I can’t see any way to configure this page, or disable the option to Skip verification to enforce security, but we’ll see what happens.

How to (really) factory reset a Poly CCX 500

Hi,

Quick one here, I was testing a few Poly CCX 500 devices for Teams Calling, and wanted to do a factory reset.

The official documentation says:

Procedure

  1. Disconnect the power, then power on the Poly phone.
  2. As soon as the Poly logo shows on the screen, press and hold the four corners of the LCD display. Note: It may take several tries to get the timing right or to find the correct spots to press on the LCD display.
  3. Release the LCD display when the Mute indicator on the lower-right corner of the phone begins flashing red, amber, and green.

However, I tried this many times without success. Doing large crab claw fingers to cover the 4 corners of the screen was doing nothing beyond hurting my fingers.

I ended up working out it was a timing thing, and the Poly logo shows twice. It will first show, then go to a black screen for a second or two, then re-show the Poly logo. If you press the 4 corners before the Poly logo comes up for the second time – nothing happens. You have to press the 4 corners of the touch screen straight away AFTER the Poly logo has come up for the second time. It won’t register if you do it earlier, and leave your fingers in the right place.

They actually have a video showing this correctly:

https://community.polycom.com/t5/video/gallerypage/video-id/6198164788001

Hope this saves someone time! I assume this is the same for CCX 400, CCX 600, Poly Trio C60 etc but haven’t tested those.

Note the default admin password for these phones is ‘456’ and you should be changing this, which is easily done automatically via a Teams Configuration Profile

Connecting to Skype for Business Online via PowerShell in a Hybrid Environment

How to connect to Skype for Business Online via Powershell

To connect to Skype for Business Online:

  • Download and install the module from Microsoft

  • Run the following commands in PowerShell:

    Import-Module SkypeOnlineConnector

    $sfboSession = New-CsOnlineSession -UserName “[email protected]” -OverrideAdminDomain “yourtennant.onmicrosoft.com”

    Import-PSSession $sfboSession

    Applies To : Windows 10, Windows Server


    I’ve been caught out by this twice and it’s taken me a while to find the rather simple answer.

    Most instructions give you a pretty simple way to connect to Skype for Business Online (or they’ll just call it Skype for Business). You install the module via executable, downloaded from Microsoft, and then try to run the following PowerShell commands (or some similar variation):

    Import-Module SkypeOnlineConnector
    $sfboSession = New-CsOnlineSession -UserName "[email protected]"
    Import-PSSession $sfboSession

    If you don’t have Skype for Business On-Premises, it should just work. If you DO have it and set up hybrid, you’ll probably get this error:

    Unable to discover PowerShell endpoint URI.
    At C:\Program Files\Common Files\Skype for Business
    Online\Modules\SkypeOnlineConnector\SkypeOnlineConnectorStartup.psm1:155 char:9
    +         throw $resources.DiscoveringEndpointFail
    +         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : OperationStopped: (Unable to disco...l endpoint URI.:String) [], RuntimeException
        + FullyQualifiedErrorId : Unable to discover PowerShell endpoint URI.

    Or, you might get this error if you managed to get the interactive logon to pop up first and then entered your credentials there:

    Get-CsOnlinePowerShellAccessToken : One or more errors occurred.
    At C:\Program Files\Common Files\Skype for Business
    Online\Modules\SkypeOnlineConnector\SkypeOnlineConnectorStartup.psm1:214 char:28
    +             $accessToken = Get-CsOnlinePowerShellAccessToken @params
    +                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Get-CsOnlinePowerShellAccessToken], AggregateException
        + FullyQualifiedErrorId : System.AggregateException,Microsoft.Rtc.Management.OnlineConnector.GetPowerShellAccessTo
       ken

    There’s a huge amount of potential fixes offered, but for me it was one simple switch, which I found thanks to enterinit.com – use the -OverrideAdminDomain switch.

    Import-Module SkypeOnlineConnector
    $sfboSession = New-CsOnlineSession -UserName "[email protected]" -OverrideAdminDomain “yourtennant.onmicrosoft.com”
    Import-PSSession $sfboSession

    Really easy fix, but the errors really don’t make it sound like this could be your problem. Now the next time I try to connect, I’ll re-read my own blog post to remind me of this switch :)

    Note: I had to connect to this to make a Microsoft Teams change!

    Default Cloud Voicemail Language

    When Cloud Voicemail a.k.a. Azure Voicemail (which replaced Unified Messaging) is activated for a mailbox, a default language is set. This value is known as the ‘promptlanguage’ and according to Microsoft Documentation will be set based on the default language for your organisation in the Microsoft 365 admin center.

    The problem is, that value is ‘English’ and doesn’t define which regional set of English you want – en-US, en-UK, en-AU etc. The full list of language codes is available here.

    With Engish set as the preferred language, Azure Voicemail decides that you must be wanting en-US as your promptlanguage – which you may not actually want. The default voicemail greeting is rather different when set to en-US vs en-UK vs en-AU.

    If you’d like to see what a user has, use the PowerShell command:

    Set-CsOnlineVoicemailUserSettings -identity [email protected]

    and check the value ‘PromptLanguage’.

    On a per user basis, this value can be changed either by the user themselves at https://mysettings.lync.com/voicemail or by an admin with the PowerShell command:

    Set-CsOnlineVoicemailUserSettings -identity [email protected] -PromptLanguage en-AU

    This still doesn’t solve the tenant wide problem, or set a default.

    For existing users, we just need to get a list of users and change the promptlanguage setting, which can be done with this set of PowerShell commands (includes connecting to SfBO which can be used for the above command also):

    $sfbsession = new-csonlinesession -username [email protected] -OverrideAdminDomain contoso.onmicrosoft.com


    Import-PSSession $sfbsession


    $users = Get-CsOnlineuser


    foreach ($user in $users) {set-csonlinevoicemailusersettings -identity $user.userprincipalname -promptlanguage en-AU}

    Note the use of the -OverrideAdminDomain switch, which I learnt from this blog post in case you are having issues connecting to Skype for Business Online.

    This process also may take a long time depending how many users you have, as very roughly it takes about a second per user to change the value.

    This will fix your existing users, but what about new ones? You could have the setting modified set as part of the user creation process, but that’s an extra step and you’d need to wait for Azure Voicemail to be ready – in my experience it’s not a service that’ll be available quickly after enabling. At this stage I haven’t found a way to do it though, so you’ll need to consider adding this configuration as part of user setup.

    If you haven’t even thought about what language you’re using – have a look and try each one, as you might find one that you’re happier with than the US.