Connect To Microsoft Teams From Linux CentOS

In this blog post, I will show you how I connect and manage Microsoft Teams using PowerShell from Linux CentOS shell.

PowerShell Core and Linux

Thanks to PowerShell Core, we can run PowerShell on Linux.

Using PowerShell, we can install the Microsoft Teams PowerShell module on Linux and manage MS Teams.

In my case, I am using CentOS 7.


The only, requirement that is needed is to Install PowerShell 7 also knows as PowerShell Core.

You can install it using the following blog post I published.

Get Started

To get started and connect to MS Teams from my CentOS machine, I will first start PowerShell using the command below:


Install Microsoft Teams

To install Microsoft Teams PowerShell module, I will run the following

Install-module microsoftteams

Import Module

Next, I will import the PowerShell

Import-Module microsoftteams


To connect to MS Teams, I will run the following command a global admin account in the USERUPN.

Connect-MicrosoftTeams -AccountId USERUPN

NOTE: To authenticate with MS Teams, you will need to open the following URL in your browser and type the code showing on the screen.

Once authorized, we can manage MS teams and run cmdlets.


To disconnect from the session, I will run the following cmdlet.