Update to Latest Microsoft Teams PS Module Causes Issue

There are some newer cmdlets in the lastest Teams powershell module that I need for some PS scripts I want to run in an AR workflow.  I updated my AR app server with the latest Teams PS module and removed the old outdated Teams module.  Now when I run my workflow I am getting the below error, apparently it is still looking to load that old module:

  • Activity encountered an error when running script 'CN=Test Azure Script,CN=Test Scripts,CN=Script Modules,CN=Configuration'.
     Details <<<
    At line: 17 char:4. Exception calling "O365ImportModules" with "1" argument(s): "unable to successfully execute Import-Module for modules System.String[]System.Management.Automation.CmdletInvocationException: Could not find file 'C:\Program Files\WindowsPowerShell\Modules\microsoftteams\2.3.1\GetTeamSettings.format.ps1xml'. --->

How can I have Active Roles use the newer Teams module (4.7.0)?  Thank you.

  • I've gotten past this issue by manually removing the old 2.3.1 module, but now when I try to import the microsoftteams module, by running this command: $context.O365ImportModule("MicrosoftTeams")


    I'm running into this error:

    • At line: 17 char:4. Exception calling "O365ImportModules" with "1" argument(s): "A parameter cannot be found that matches parameter name 'ApplicationId'."

    Importing all other 365 modules (Az,AzureAD,ExchangeOnlineManagement) works without issue