Skype For Business

Migrating Phone System from Skype for Business to Microsoft Teams

I thought I’d document a few lessons learned in this migration. The migration was from Skype for Business Server 2015 and Skype for Business 2016 clients with Enterprise Voice, moving users across to Microsoft Teams.


The steps to migrate a user for me were:

  1. Add user to AD Group “Azure AD Licensing Telstra Calling for Office 365” as this allocates a Telstra Calling for Office 365 license. These licenses are bought from https://marketplace.telstra.com/ and feed into Microsoft 365. I believe this is unique to Australia.
  2. From Skype for Business Server Management Shell:
    $cred=Get-Credential
    $url="https://adminau1.online.lync.com/HostedMigration/hostedmigrationService.svc" (different links here for different countries)
    Move-CsUser -Identity [email protected] –Target sipfed.online.lync.com -MoveToTeams -Credential $cred -HostedMigrationOverrideUrl $url

    set-csuser -identity [email protected] -LineURI $null
  3. Form a machine with the Teams PowerShell Module installed:
    $Session = New-CSOnlineSession -OverrideAdminDomain yourdomain.onmicrosoft.com
    Import-PSSession $session –AllowClobber
    Set-CsOnlineVoiceUser -Identity [email protected] -TelephoneNumber 61812341234
    Grant-CsTeamsUpgradePolicy -PolicyName UpgradeToTeams -Identity [email protected]
  4. Configure call forwarding in Gateway (Pilot Users only that were being given a new number out of our normal number range)

EHR Error on Teams Portal

We can’t get details of EHR usage. Please try again. If you continue to have problems, contact Microsoft customer support.

Seeing this error everywhere on the Teams Admin portal, unsure what the cause/fix is yet. It ended up disappearing by itself after a few weeks *shrug* – you’ll see this theme is common around portal errors.


Dial Plans error


We can’t get the effective dial plan so the dial plan can’t be tested.

Going into any Dial Plan brings up this admin portal error, as well as trying to run a Test Dial plan test:

Something went wrong while testing this phone number. If you continue to have problems, contact Microsoft customer support.

This problem was another portal issue – logged a case which Microsoft confirmed was at their end, and a few weeks later they’d resolved it.


Create Resource Account error

We can’t save changes to ___

When creating a Resource Account used for Auto Attendant or Call queues, I was getting a very unhelpful error. I believe this is because I’m running in hybrid mode, so Teams can’t create an account on my primary domain – changing the domain to @contoso.onmicrosoft.com then let me create the Resource Account.

This problem also disappeared later and now I can create accounts on my primary domain – put it down to another portal issue.


Desk Phones requiring PIN

Phones would be registered in Intune, because they’re running Android – and that means any ‘all user’ Android policy would apply.

I’ve since created Dynamic Device Groups and filtered by DeviceModel and DeviceOSType – only testing the Poly CCX500 at this stage, but will add more models as we get them. Also filtering by OStype which is not really necessary, but does make sure it’s only Android devices affected.

(device.deviceModel -eq "CCX500") and (device.deviceOSType -eq "Android")

If you use a test account 20 times, that account will hit its device limit in azure and get locked out.


Skype for Business users unable to call Teams users

Early in migration, we tested interoperability between the two platforms, as it wasn’t going to be an overnight company wide migration. A Skype for Business user trying to call a migrated to Teams user would instead get diverted elsewhere. This was because we had Unassigned Number range rules in place, that were designed to send calls somewhere if it wasn’t allocated to anyone. Removing these rules immediately fixed this issue.


Home Screen on Desk Phones Laggy

The default experience if the phone supports it, is to show a home screen. More details on what the Home Screen is here. This is in CsTeamsIPPhonePolicy with the default value ‘AllowHomeScreen’ set to ‘EnabledUserOverride’. Changing this to Disabled via the PowerShell command:

set-CsTeamsIPPhonePolicy -allowhomescreen Disabled

removed this. I like the idea of the Home Screen, but not at the cost of a fast functioning phone vs a slow one.

I later found out this is due to the 1GB RAM on some devices, and Teams now (at the time of writing) uses > 1GB RAM, and then the Home Screen uses even more RAM. Trying a phone model with 2GB RAM this all worked perfectly.

I believe this is also fixed now, but it took Microsoft about 5 months to resolve.


New Desk Phones not signing in

Testing the Poly CCX500 model, some wouldn’t sign in to Teams out of the box. As soon as I tried to sign in, they’d say:

‘Error Could not sign in. You will need to sign in again. If you see this message again, please contact your company support. OK’

I spent so long on this, unsuccessfully trying to update the firmware via USB etc. In the end, turning off the ‘DHCP Time’ setting under ‘Device Settings’ made it work – I assume it had some problems contacting a NTP server (settings appeared correct in the DHCP scope of the phone). Someone else found the same issue here, but this was due to the phone running a very old v1 firmware. This shouldn’t affect most people, but worth noting.


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.

    Microsoft Teams Dial In Number Licensing – Conference Bridging

    Microsoft Teams does a bunch of different things. One of those things, is meetings. It does it quite well too, and many more people have started using Microsoft Teams this year. There’s a few different types of meetings (including Live Events) and a huge amount of content available (video) on advice on how to run one.

    However, if you’re not using Microsoft Teams as a full phone system, then meetings are restricted to software based only – you need to use the Microsoft Teams client via browser or full install (on desktop or mobile) to join; there’s no dial in number.

    It is possible to buy licenses to give users the ability to create a meeting that also has dial-in support (called Conference Bridging), as long as you are a Volume or Licensing customer. If you meet the pre-requisites, then this just needs an Audio Conferencing license of some sort, with the standard license being per user (like most other licenses) and several dollars a month. In Australia at the time of writing, a license costs RRP $5.50AU if you already have an E1 or E3 license.

    For companies that have a central set of staff creating meetings on behalf of the company, then buying a small amount of licenses just for those users can be a good way of getting the dial in option to add value and give a rather cheap way of providing a full audio and video conferencing solution.

    A much less common option method of providing a dial in number for Microsoft Teams meetings is using Audio Conferencing pay-per-minute. The way this works is by loading up credits into
    Communications Credits
    , applying the free license to whomever you like, and anyone using a dial-in number starts using those credits. The rates vary wildly based on many scenarios, so you’ll need to check them out for yourself – from less than 10 cents AU upward.

    Quick run through of what to set up – read it all before doing any of it!



    Communications Cred
    its
    Microsoft’s doco explains how to do this rather clearly:

    In the Microsoft 365 admin center > Billing > Purchase Services > Add Ons you can select Communication Credits to add the credits, and you can add credit manually at any time. You can also enable the Auto-recharge option, which will allow automatic account refills when the balance falls below the threshold that you set.

    I couldn’t see that Add Ons category, so searched for “Communication Credits’ under the Purchase Services area, had no results but then saw a link to check the Add-ons category’. On that list I could then see Communication Credits to add. For me in Australia, the minimum was $20.

    The auto recharge option can only be triggered when the amount goes below $50 as a minimum (smallest number the field would accept), but I could recharge for another $20, so that’s a fairly small commitment if you expect minimal usage. I set this when I had $20 in, and it did a double recharge to get over the $50 mark instantly.


    Audio Conferencing pay-per-minute

    You can only get this if you’re a Volume and Licensing customer of Microsoft.

    This was the tricky one to find out, but easy once you know what to ask for. You’ll need to ask your license reseller/LAR for:

    AudioConfPayPerMin ShrdSvr ALNG SubsVL MVL PerUsr , SKU: HUR-00002

    It’s a $0 license, and you may need to say how many licenses (they’re free so go high).

    Once they order it, the licenses should turn up like any other under an enterprise agreement, called “Microsoft 365 Audio Conferencing Pay-Per-Minute”.


    Applying the license

    You can’t just apply the Communications Credits license to a user, as it’ll tell you they need to have an Audio Conferencing plan. You can do both at the same time manually, as long as the user has a Skype for Business Online or Microsoft Teams license.

    If you want to use Azure AD and assign a license to a group you’ll need to tick all three licenses; Communications Credits, Audio Conferencing pay-per-minute, and Microsoft Teams or Skype for Business. It doesn’t matter if members of the group already get part of the license from another group membership, it requires all three to be applied.


    Microsoft Teams Configuration

    There’s not much to do here, you might already be configured and ready to go – but you can check your Conference Bridging settings in the Teams admin center and make sure you’re happy with the default number and options.


    You’re done! It can take a little while for the dial in number to show in the Teams signature when creating a meeting via Outlook – maybe a few hours from my experience.

    You can check the status of your credits in the Microsoft 365 admin center, under Billing > Your Products > Communications Credits (it’ll have the Skype for Business logo).

    Hopefully this helps people that have Teams, but aren’t ready to go to it for a full voice solution yet, while allowing others to dial into meetings (very handy when someone doesn’t have a good internet connection).

    Note: You can see how your credits are being used here:

    1. Sign in to Office 365, navigate to the “Teams admin portal”, then “Legacy Portal” on the left menu.
    2. Navigate to “Reports” on the left menu, then the “PSTN minute pools” tab.

    Stopping Skype for Business Autostarting in Windows 10

    Should be simple, right?

    I installed Skype for Business for Office 365 on my home PC. I had Office 365 ProPlus, and the version of Skype for Business has to match that.

    Worked great, and realising I didn’t want it running all the time on my home PC, I changed the option to ‘Automatically start the app when I log on to Windows’ in the Personal options:

    The next day over the weekend, I noticed that Skype for Business had decided to still launch at login. Weird, so I checked what Task Manager had to say:

    Skype for Business wasn’t even listed. I started mucking around a bit more, ticking the option to automatically start, pressing OK, turning it off, pressing OK, rebooting – but every time, Skype for Business just turned up, like a strange uncle you never invite to dinner but somehow still finds out and turns up every night.

    Maybe it’s in the Startup folder in the Start Menu? Is that still a thing in Windows 10? Yes it is. It’s under C:\Users\username\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup – replacing ‘username’ with what you’re thinking you should replace it with. Except, there was nothing there.

    I also checked the standard Run locations in the registry, and then even searched for all instances of lync.exe which is still what runs Skype for Business… no hits that make any sense to it running at startup.

    Of course, my next step is to complain on Twitter:

    Interesting – Skype for Business runs at user login, but it’s not listed in Task Manager > Startup, or in the registry’s Run locations. The app even has ‘run at startup’ turned off. Not in the Start Menu Startup folder either. Don’t understand what’s triggering it…— Adam Fowler (@AdamFowler_IT) April 12, 2020

    No winners in the responses – I checked sysinternaltools autoruns as suggested by Neil Clinch, and Guy Leech had a suggestion on how to completely block lync.exe from running ever, but I still wanted to use Skype for Business.

    My Googling hadn’t fared any results, and I was getting desperate. I actually took a chance and read some answers.microsoft.com threads (which are usually sfc /scannow or unhelpful answers that didn’t read the question properly) and user Daniel Wherle had responded to a thread with my exact problem.

    The answer was a setting called ‘Use my sign-in info to automatically finish setting up my device and reopen my apps after an update or restart’. This is hidden in Windows 10 Settings > Accounts > Sign-in options. It’s down the very bottom:

    After I turned this option off and rebooted, Skype for Business no longer launched at startup. I even launched it manually, and restarted while it was running.

    I turned the setting back on and rebooted, Skype for Business still didn’t autostart – that is, until I ran it with the option on, exited and rebooted.

    It’s worth noting that even after completely exiting Skype for Business, lync.exe still ran in the background. I suspect this is part of the problem, because it also won’t re-open until that task is killed. I don’t have any other Office apps open, and it seems like a common enough problem that others will hit it – maybe with other programs too and this Windows 10 option enabled.

    A strange one, but probably as far as I’ll dig on the issue.

    How to stop Skype for Busines from Autostarting in Windows 10:

    To stop Skype for Business from loading at startup:

    1. In Skype for Business – Options go to the Personal option
    2. Untick ‘Automatically start the app when I log on to Windows’

    3. If that doesn’t work:

    4. Go into Windows Settings > Accounts > Sign-in options.
    5. Click Accounts.
    6. In the Sign-in options section, untick ‘Use my sign-in info to automatically finish setting up my device and reopen my apps after an update or restart’

    Applies To : Windows 10