Forum Discussion
Authenticating with an access token Connect-MicrosoftTeams
- Oct 15, 2021FYI - I raised a ticket, and it should be fixed by mid november.
Issue description:
Cannot properly run Connect-MicrosoftTeams -AccessTokens
Resolution Steps:
Escalated case with our engineering Team
Issue is known bug and currently being fixed
Expecting a fix to go out by NOV mid
- PhoneMe007Apr 16, 2021Brass ContributorNo change teams1535 ☹️
- teams1535Apr 26, 2021Copper ContributorUpdate: Microsoft has released a preview version (2.1.0) of the Teams PowerShell module which works properly with modern authentication. It’s likely that this version will be pushed through to general availability quite quickly.
Please go through this link for more information.
https://office365itpros.com/2021/03/10/microsoft-updates-teams-powershell-module-2-0/- PhoneMe007Apr 26, 2021Brass Contributor
teams1535 Unfortunately this method still doesn't work with any of the voice related cmdlets/functions - Get-CsOnlineSession for example is not a recognised cmdlets when you try running it.
PS C:\WINDOWS\system32> Set-CsOnlinePSTNUsage -Identity Global -Usage @{add="UnrestrictedPstnUsage"}
Get-CsOnlineSession : Run Connect-MicrosoftTeams before running cmdlets.
At C:\Program Files\WindowsPowerShell\Modules\MicrosoftTeams\2.2.0\net472\SfBORemotePowershellModule.psm1:57 char:22
+ $remoteSession = & (Get-CsOnlineSessionCommand)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-CsOnlineSession], UnauthorizedAccessException
+ FullyQualifiedErrorId : UnauthorizedAccessException,Microsoft.Teams.ConfigApi.Cmdlets.GetCsOnlineSession
Invoke-Command : Cannot validate argument on parameter 'Session'. The argument is null or empty. Provide an argument
that is not null or empty, and then try the command again.
At C:\Program Files\WindowsPowerShell\Modules\MicrosoftTeams\2.2.0\net472\SfBORemotePowershellModule.psm1:47766 char:38
+ ... -Session (Get-PSImplicitRemotingSession -CommandName 'Set-CsOnline ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Invoke-Command], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeCommandCommand