locked
Not able to connect to Skype for Business using powershell RRS feed

  • Question

  • Hi Team,<o:p></o:p>

    I;m not able to connect to Skype for Business server using powershell.<o:p></o:p>

    i have installed all necessary modules(skype) in my 64 bit windows 7 system.<o:p></o:p>

    Below is what i have executed in powershell.<o:p></o:p>

    1)Set-ExecutionPolicy RemoteSigned<o:p></o:p>

    2)Import-Module SkypeOnlineConnector<o:p></o:p>

    3)$sfboSession = New-CsOnlineSession -Credential $credential  -OverrideAdminDomain "mycompany.onmicrosoft.com“<o:p></o:p>

    once i provide my credentials, it shows error: Failed to connect live id servers. Make sure proxy is enabled or machine has network connection to live id servers.<o:p></o:p>

    i'm not sure, if there is any issue at my end.i'm not quite sure of the accesses that are must required to access skype via powershell. i have checked msoidsvc service and it is up and running(as suggested by microsfot in below link)<o:p></o:p>

    https://technet.microsoft.com/en-us/library/dn362811(v=ocs.15).aspx<o:p></o:p>

    i need a help to resolve this issue. <o:p></o:p>


    Friday, October 7, 2016 8:38 AM

Answers

  • Hi Rabhishek,

    You are right. First of all, you should make sure login in Office 365 using Office 365 portal. If not, you should contact Office 355 support by the following link:

    https://support.office.com/en-us/article/Contact-Office-365-for-business-support-Admin-Help-32A17CA7-6FA0-4870-8A8D-E25BA4CCFD4B?ui=en-US&rs=en-US&ad=US 

    If there are any questions or issues, please be free to let me know and we will pleasure to help you. If the above suggestion are helpful to you, please mark it as answer so that someone who has similar issue could find this thread as soon as possible.

    Best Regard,
    Jim Xu
    TechNet Community Support


    Please remember to mark the replies as an answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    • Proposed as answer by jim-xu Monday, October 17, 2016 10:09 AM
    • Marked as answer by jim-xu Friday, October 21, 2016 10:41 AM
    Thursday, October 13, 2016 5:39 AM

All replies

  • do you have proxy in the network? if yes you need to use netsh winhttp set proxy  to configure the proxy

    Friday, October 7, 2016 7:51 PM
  • Hi GUIz49,

    Thank you for your prompt reply.

    i don't have any proxies set in my computer(i.e internet options-->Connections-->everything is unchecked except "Automatically detect settings")

    As from the error it shows that i need to set the proxy and enable it. but what proxy do i need to set to get this working ? 

    here is the complete error i'm receiving in powershell window

    PS C:\Users\user> $sfboSession = New-CsOnlineSession -Credential $credential  -OverrideAdminDomain "mycompany.onmicrosoft.com“
    Get-CsWebTicket : Failed to connect live id servers. Make sure proxy is enabled or machine has network connection to live id servers.
    At C:\Program Files\Common Files\Skype for Business Online\Modules\SkypeOnlineConnector\SkypeOnlineConnectorStartup.psm1:107 char:18
    +     $webticket = Get-CsWebTicket -TargetServer $TargetServer -Credential $Creden ...
    +                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Get-CsWebTicket], CommonAuthException
        + FullyQualifiedErrorId : Microsoft.Rtc.Admin.Authentication.CommonAuthException,Microsoft.Rtc.Management.OnlineConnector.GetWeb 
       TicketCmdlet

    Saturday, October 8, 2016 11:47 AM
  • are you trying to connect from internal network if yes you may need to check with network team which proxy to use, also you may need a whiteliste for lync online URls.

    did you try from laptop connected to internet ? 

     
    Saturday, October 8, 2016 5:24 PM
  • Hi Rabhishek,

    Welcome to our forum.

    By this issue, please refer to the following steps for troubleshooting:

    1. Update Windows 7 to the latest
    2. Disable Windows firewall and A/V software 

    If this issue persist, please do those steps on Windows server 2012 R2 to have a check.

    If there are any questions or issues, please be free to let me know and we will pleasure to help you. If the above suggestion are helpful to you, please mark it as answer so that someone who has similar issue could find this thread as soon as possible.

    Best Regard,
    Jim Xu
    TechNet Community Support


    Please remember to mark the replies as an answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Monday, October 10, 2016 8:23 AM
  • Hello GUIz49,

    My PC is directly connected to internet (using internet dongle). however when you said that i need to whitelist Lync online URLs, i checked if i'm able to access lync online. below is what i get:

    Server Error

    <fieldset style="padding:0px 15px 10px;">

    403 - Forbidden: Access is denied.

    You do not have permission to view this directory or page using the credentials that you supplied.

    </fieldset>

    1) login at https://sched.lync.com/

    1) it redirected to https://login.microsoftonline.com/

    2) provided it with my company's username Name@mycompany.com

    3) page got redirected to my company's portal

    4) i put my username and password there(domain\username and password)

    5) got this error

    403 - Forbidden: Access is denied.

    You do not have permission to view this directory or page using the credentials that you supplied.


    Monday, October 10, 2016 10:48 AM
  • Hello Jim,

    Thanks for your reply.

    i have checked and windows seems to be updated. also i have disabled Firewall and antivirus.

    As mentioned to GUIz49

    1) login at https://sched.lync.com/

    2) it redirected to https://login.microsoftonline.com/

    3) provided it with my company's username Name@mycompany.com

    4) page got redirected to my company's portal

    5) i put my username and password there(domain\username and password)

    6) got this error

    403 - Forbidden: Access is denied.

    You do not have permission to view this directory or page using the credentials that you supplied.

    the process of login to office 365 is quite tedious. For logging in 365 live server, i need to give my company's Full userid: Firstname.Lastname@mycompany.com and then it redirects to my company portal where i have to give some different username (domain\userid and password) and then finally i get logged in.

    However in powershell when it asks for Credentials at step($sfboSession = New-CsOnlineSession -Credential $credential  -OverrideAdminDomain "mycompany.onmicrosoft.com“),i'm trying it with different usernames. viz: 1st with Firstname.Lastname@mycompany.com and 2nd with (domain\userid). so i'm not sure which userid powershell will use. however for both the user id's i'm getting same error.

    Monday, October 10, 2016 10:59 AM
  • Also i wanted to add one thing here, when i tried logging in https://www.office.com i'm not seeing any apps in my home page. below is the error i'm getting.

    Just so you know…

    You should be seeing tiles for each of your online apps. Contact your IT department. They can help you get up and running.

    i'm not sure is that is casing the issue to connect to skype using powershell :(

    Monday, October 10, 2016 11:14 AM
  • Please try this instead:

    $cred = Get-Credential

    $cssession = New-CsOnlineSession -OverrideAdminDomain "yourdomain.onmicrosoft.com"

    Import-PSSession $CSSession –AllowClobber

    Also check if your issue is related to this:

    https://blogs.msdn.microsoft.com/powershell/2016/08/23/powershell-dsc-broken-in-kb3176932/

    Uninstall KB3176934 if so.


    Please mark as helpful if you find my contribution useful or as an answer if it does answer your question. That will encourage me - and others - to take time out to help you. Thank you! Off2work

    Monday, October 10, 2016 11:20 AM
  • DO yo uhave permission and license? you need to be Skype for business admin in office 365 and have Skype for business licence. are yo uable to go to admin portale for Skype for business?
    Monday, October 10, 2016 1:05 PM
  • Hi GUIz49,

    i do have permission and license. however i don't see any apps in my Offiice 365 portal. also when i login to office 365, i see this error 

    "Just so you know…

    You should be seeing tiles for each of your online apps. Contact your IT department. They can help you get up and running."

    And when i click on "install apps" link, i get this below error:

    Please contact your admin. It looks like they haven't assigned you a license for the Office desktop apps.

    i think i don't have admin role access. is that causing this issue ?

    Wednesday, October 12, 2016 12:10 PM
  • Hi Rabhishek,

    You are right. First of all, you should make sure login in Office 365 using Office 365 portal. If not, you should contact Office 355 support by the following link:

    https://support.office.com/en-us/article/Contact-Office-365-for-business-support-Admin-Help-32A17CA7-6FA0-4870-8A8D-E25BA4CCFD4B?ui=en-US&rs=en-US&ad=US 

    If there are any questions or issues, please be free to let me know and we will pleasure to help you. If the above suggestion are helpful to you, please mark it as answer so that someone who has similar issue could find this thread as soon as possible.

    Best Regard,
    Jim Xu
    TechNet Community Support


    Please remember to mark the replies as an answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    • Proposed as answer by jim-xu Monday, October 17, 2016 10:09 AM
    • Marked as answer by jim-xu Friday, October 21, 2016 10:41 AM
    Thursday, October 13, 2016 5:39 AM
  • Hi Everybody,

    Thank you for all your help and suggestions.

    i'll contact my Network team to provide me admin access to office 365 portal. i'll keep you posted. Thank you again.

    Friday, October 14, 2016 6:57 AM
  • Please ask Network team to have this completely check . https://support.office.com/en-us/article/Office-365-URLs-and-IP-address-ranges-8548a211-3fe7-47cb-abb1-355ea5aa88a2?ui=en-US&rs=en-US&ad=US#BKMK_LYO.

    Hope things will sort out.

    Friday, October 14, 2016 7:10 AM
  • Hi Rabhishek,

    Are there any updates for this issue?

    Please tell us more details about you get help from your network team, and if there are any questions or issues, please be free to let me know and we will pleasure to help you. If the above suggestions are helpful to you, please mark it as answer so that someone who has similar issue could find this thread as soon as possible.

    Best Regard,
    Jim Xu
    TechNet Community Support


    Please remember to mark the replies as an answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Wednesday, October 19, 2016 7:23 AM