Forum Discussion

PhoneMe007's avatar
PhoneMe007
Brass Contributor
Mar 24, 2021
Solved

Authenticating with an access token Connect-MicrosoftTeams

Has anyone tried authenticating with an access token (using -AadAccessToken or -MsAccessToken)? The old version of New-CsOnlineSession had an -OAuthAccessToken param, which accepted a jwt with the PS permissions in the scope, which one could obtain silently, and so avoid login.

New-CsOnlineSession has been dropped and the SfB Connector is end of life in July and Connect-MicrosoftTeams does appear to support token for the telephony functions.
  • FYI - I raised a ticket, and it should be fixed by mid november.

    Issue description:
    Cannot properly run Connect-MicrosoftTeams -AccessTokens

    Resolution Steps:
    Escalated case with our engineering Team
    Issue is known bug and currently being fixed
    Expecting a fix to go out by NOV mid

135 Replies

  • M365061290's avatar
    M365061290
    Iron Contributor
    what is the use of releasing this powershell if it doesn't work
  • CseuzA's avatar
    CseuzA
    Copper Contributor
    I have experienced the same thing with Get-CsOnlineUser.
    • KarstenSkuldbol's avatar
      KarstenSkuldbol
      Copper Contributor
      Can anyone in Microsoft please share some information on, when then cmdlet, Grant-CsOnlineVoiceRoutingPolicy, will be available with App Based Authentication using certificate?

      Currently its only available in none-interactive scripts using Client Secret !!!!
    • PhoneMe007's avatar
      PhoneMe007
      Brass Contributor
      Similarly lots of items are broken: https://twitter.com/AndresGorzelany/status/1377263616353824774?s=19
      • teams1535's avatar
        teams1535
        Copper Contributor
        Hi PhoneMe007 could you please check with latest Powershell Teams module. It have the inbuilt sfb connecter features.
    • PhoneMe007's avatar
      PhoneMe007
      Brass Contributor
      New-CsOnlineSession has an -OAuthAccessToken param, which accepted a jwt with the Powershell permissions in the scope, which we could obtain silently, and so avoid login to run the Powershell commands. This no longer works for Connect-MicrosoftTeams with any of the voice related cmdlets and functions. We can obtain the token but Powershell returns an error.

Resources