Migrating to the new Teams Remote PowerShell (using PSsession outside of Teams Module)

%3CLINGO-SUB%20id%3D%22lingo-sub-2430856%22%20slang%3D%22en-US%22%3EMigrating%20to%20the%20new%20Teams%20Remote%20PowerShell%20(using%20PSsession%20outside%20of%20Teams%20Module)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2430856%22%20slang%3D%22en-US%22%3E%3CP%3EFollowing%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoftteams%2Fteams-powershell-move-from-sfbo%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3Eclosure%20of%20SFBO%20Connector%3C%2FA%3E%20on%20May%2017%2C%202021%2C%20trying%20to%20adapt%20our%20web%20app%20to%20use%20the%20new%20Teams%20Remote%20PoweShell%20endpoint%20%3CA%20href%3D%22https%3A%2F%2Fapi.interfaces.records.teams.microsoft.com%2FOcsPowershellOAuth%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fapi.interfaces.records.teams.microsoft.com%2FOcsPowershellOAuth%2F%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERemote%20session%20has%20to%20be%20established%20outside%20of%20the%20Teams%20module%2C%20thus%20using%20%60New-PSSession%20-ConnectionUri%20%24TeamsURI%60%20cmdlet.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHowever%2C%20after%20making%20all%20necessary%20changes%20(that%20I%20can%20think%20of)%20in%20the%20AAD%20app%20and%20Teams%20PowerShell%20endpoint%20URI%20-%26nbsp%3Bgetting%20same%20rejection%20as%20when%20trying%20to%20connect%20to%20the%20deprecated%20SFBO%20endpoint%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3ENew-PSSession%20%3A%20%5Bapi.interfaces.records.teams.microsoft.com%5D%20Processing%20data%20from%20remote%20server%20api.interfaces.records.teams.microsoft.com%20failed%20with%20the%20following%20error%20message%3A%20Skype%20for%20Business%20Online%20PowerShell%20connections%20are%20blocked.%20Please%20replace%20the%20Skype%20for%20Business%20Online%20PowerShell%20connector%20module%20with%20the%20Teams%20PowerShell%20Module%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThat's%20strange%2C%20considering%20that%20I'm%20not%20even%20using%20the%20SFBO%2FTeams%20Module%20and%20that%20the%20app%20scopes%20%26amp%3B%20endpoints%20have%20been%20adapted%20for%20Teams.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20suggestions%20on%20how%20to%20overcome%20this%3F%20Thanks%20in%20advance.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2430856%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Senior Member

Following the closure of SFBO Connector on May 17, 2021, trying to adapt our web app to use the new Teams Remote PoweShell endpoint https://api.interfaces.records.teams.microsoft.com/OcsPowershellOAuth/

 

Remote session has to be established outside of the Teams module, thus using `New-PSSession -ConnectionUri $TeamsURI` cmdlet.

 

However, after making all necessary changes (that I can think of) in the AAD app and Teams PowerShell endpoint URI - getting same rejection as when trying to connect to the deprecated SFBO endpoint:

 

New-PSSession : [api.interfaces.records.teams.microsoft.com] Processing data from remote server api.interfaces.records.teams.microsoft.com failed with the following error message: Skype for Business Online PowerShell connections are blocked. Please replace the Skype for Business Online PowerShell connector module with the Teams PowerShell Module

 

That's strange, considering that I'm not even using the SFBO/Teams Module and that the app scopes & endpoints have been adapted for Teams.

 

Any suggestions on how to overcome this? Thanks in advance.

0 Replies
www.000webhost.com