Dec 13 2018 01:54 AM
Hi Experts
I am using MFA for office365, could you please help me with the syntax to connect to SFB online powershell module.
i have installed onlinepowershell module module but i am getting below error
PS C:\Program Files\Common Files\Skype for Business Online\Modules\SkypeOnlineConnector> Import-Module SkypeOnlineConnector
PS C:\Program Files\Common Files\Skype for Business Online\Modules\SkypeOnlineConnector> $sfbSession = New-CsOnlineSession
Please enter the user principal name (ex. User@Domain.Com): myuser@mydomain.com
Unable to discover PowerShell endpoint URI
At C:\Program Files\Common Files\Skype for Business
Online\Modules\SkypeOnlineConnector\SkypeOnlineConnectorStartup.psm1:114 char:9
+ throw $resources.DiscoveringEndpointFail
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (Unable to disco...ll endpoint URI:String) [], RuntimeException
+ FullyQualifiedErrorId : Unable to discover PowerShell endpoint URI
Dec 13 2018 02:16 AM - edited Dec 13 2018 02:17 AM
Hi,
Connect with
Import-Module SkypeOnlineConnector
$userCredential = Get-Credential
$sfbSession = New-CsOnlineSession -Credential $userCredential
Import-PSSession $sfbSession
Or you are signing in with a MFA enabled account
Import-Module SkypeOnlineConnector
$sfbSession = New-CsOnlineSession
Import-PSSession $sfbSession
You could also use this script to make it easier
https://gallery.technet.microsoft.com/Office-365-Connection-47e03052
Dec 13 2018 02:26 AM
PS C:\Users\user1.mydomain> $sfbSession = New-CsOnlineSession
Please enter the user principal name (ex. User@Domain.Com): adminacct@mydomain.com
Unable to discover PowerShell endpoint URI
At C:\Program Files\Common Files\Skype for Business
Online\Modules\SkypeOnlineConnector\SkypeOnlineConnectorStartup.psm1:114 char:9
+ throw $resources.DiscoveringEndpointFail
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (Unable to disco...ll endpoint URI:String) [], RuntimeException
+ FullyQualifiedErrorId : Unable to discover PowerShell endpoint URI
Dec 13 2018 02:31 AM