I have an issue while connecting Microsoft teams with -AadAccessToken. Error details are provided below:
Is there any solution or alternative approach available in Microsoft-Teams PowerShell Module to execute CS commands after making connection using Token?
Connect-MicrosoftTeams -AadAccessToken $token -AccountId $acctName
Account Environment Tenant TenantId
<Email ID> AzureCloud <Tenant Id> <Tenant Id>
PS C:\Users\ensar> Get-CsOnlineUser
Exception calling "GetSteppablePipeline" with "1" argument(s): "Exception calling "GetRemoteNewCsOnlineSession" with "1" argument(s): "Run either Connect-MicrosoftTeams or new-csonlinesession before running cmdlets.""
At C:\Program Files\WindowsPowerShell\Modules\MicrosoftTeams\2.0.0\net472\SfBORemotePowershellModule.psm1:9474 char:13
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($myI ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : CmdletInvocationException