powershell connect-microsoftteams already connected profile

Felippe Silvestre 0 Reputation points

I have a powershell script that I run repeatedly. My user are already connected to my work MS account. Is there a way to not run the connect-microsoftteams command - as it is already connected?

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
9,061 questions
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,050 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. LiweiTian-MSFT 13,985 Reputation points Microsoft Vendor

    Hi @Felippe Silvestre

    The Connect-MicrosoftTeams cmdlet connects an authenticated account for use with cmdlets from the MicrosoftTeams module.

    Whenever your user needs to start using the Microsoft Teams PowerShell module, the user needs to use connect-microsoftteams to call cmdlets from the Microsoft Teams module. Even if the user is already logged into your account from another application.

    ********************************************************************************************************* If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread. *********************************************************************************************************