Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

how to use Connect-MicrosoftTeams in script

$
0
0

Hi,

I am trying to use Connect-MicrosoftTeams command and assign users to teams in Teams with scheduled script, according to group membership in AD. However, I have to always authenticate and also manually click on "Pick an account" dialog window.

$mycreds=Get-Credential #in script I saved my credential in encrypted string

Connect-MicrosoftTeams -Credential $mycreds -AccountId "account@domain.com"

How can I use this command and successfully log-in to cloud service with no user interaction ?


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>