PowerShell Commands
2 TopicsPowershell New-CsOnlineSession with AccessToken
Hello guys, I am trying to run 'New-CsOnlineSession' with -OAuthAccessToken parameter in a Powershell script. The oauth token comes from a WebApp that authenticates the user. This WebApp uses Microsoft Identity Platform so the user accepts our app to access user's resorces. The WebApp uses OAuth2 to communicate with Microsoft Identity Platform. This WebApp is registered in the Azure Portal. The problem is that I cannot create the session and the error is: "OAuthAccessToken has invalid audience" I've tried to use -OverrideAccessTokenResourceUri parameter too, in conjunction with OAuthAccessToken, but it doesn't allow the script to get a session. When I use New-CsOnlineSession with user/password, everything works fine, I can import the session and use the commands perfectly. Logs: VERBOSE: OAuthAccessToken is provided. VERBOSE: Determining domain to administer VERBOSE: AdminDomain = 'xxxxxxxx.onmicrosoft.com' VERBOSE: Discovering PowerShell endpoint URI VERBOSE: TargetUri = 'https://admin1e.online.lync.com/OcsPowershellOAuth' VERBOSE: AuthUri = 'https://login.windows.net/common/oauth2/authorize', ClientId = 7716031e-6f8b-45a4-b82b-922b1af0fbb4 VERBOSE: Validating authentication token. New-CsOnlineSession : OAuthAccessToken has invalid audience 00000003-0000-0000-c000-000000000000, expected https://admin1e.online.lync.com/OcsPowershellOAuth. At G:\server-8000.ps1:20 char:12 + $session = New-CsOnlineSession -OAuthAccessToken $token -Verbose -Deb ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,New-CsOnlineSession Thanks in advance for any help. Hernan6KViews0likes6CommentsSwitch Skype users configuration from "Audio and HD video" to "Audio and video" using powershell
Hello, Within Skype user management part, users have by default within there option the ability to do "audio and HD video" https://docs.microsoft.com/en-us/skypeforbusiness/set-up-skype-for-business-online/let-people-record-their-audio-and-video-conferences I want to change this setting for all my users but don't found any PowerShell command to do it and found nothing related to it on Internet. Is there a way to do it and so restrict usage of HD video to only SD video ? Regards Vincent VALENTIN1.4KViews0likes1Comment