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 ?