Forum Discussion
Powershell New-CsOnlineSession with AccessToken
hernan-invosys is there a reason why you should still be using these cmdlets? As they are now incorporated in the https://docs.microsoft.com/en-us/microsoftteams/teams-powershell-release-notes module since 1.1.3-Preview. The latter supporting a wider variety of authentication methods. Still there might be a reason not to switch that I am unaware of... Thanks for your insight.
- hernan-invosysJul 20, 2020Copper Contributor
Hello SjoerdV,
Thanks for you message.
I'm using New-CsOnlineSession because this way I get Get-CsOnlineUser which is the unique cmdlet that returns the info I need: OnPremLineURI. This is the Phone Number column that is shown on https://admin.teams.microsoft.com/users .No other connection or cmdlet gives this info as result. I've tried installing different modules but no one returns that phone number (they return some numbers but not this one specifically): MicrosoftTeams (1.1.4), MSOnline, AzureAD. Even Microsoft Graph API
- SjoerdVJul 20, 2020Iron Contributor
hernan-invosys ah yes, I felt somewhat 'disappointed' when I noticed the absence of the Get-CsOnlineUser cmdlet in the MicrosoftTeams module. If only that would be there I could abandon having an additional module installed. Btw. running Connect-CSOnline as provided by the current MicrosoftTeams Module (1.1.3/4 and the 1.0.0.25 test version) gives me a lot of authentication issues in combination with other modules. There is still some work to be done, as it seems 😉