Forum Discussion
Powershell New-CsOnlineSession with AccessToken
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
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 😉