2017-04-05 124 views
1

我无法通过S4BO进行身份验证。我已经注册了我的应用程序(在蔚蓝的门户)和它在https://ucwa.skype.com/websdk 过程工作correclty与webSDK演示中,我所遵循的是以下之一:无法通过Skype For Business Online进行身份验证UCWA

  1. 我做了OAuth的链接下面的代码重新定向:

    https://login.microsoftonline.com/common/oauth2/authorize?response_type=code&client_id=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&resource=https://webdir.online.lync.com&redirect_uri=http://myurl.dev/skype 
    
  2. 获取已返回的授权码,并用它来生成一个访问令牌:

    POST https://login.microsoftonline.com/common/oauth2/authorize?response_type=code&client_id=db01d1f5-f2a3-4d82-b4bc-6b3b4071d7df&resource=https://webdir.online.lync.com&redirect_uri=http://acme.intranet.dev/skype 
    
        grant_type=authorization_code 
        code=$thecodehere 
        client_id=$clientidhere 
        client_secret=$clientsecrethere 
        redirect_uri=$sameuriasbefore 
    
  3. 之后,我有我的访问令牌。现在我需要我的用户网址。所以我做自动发现

    GET https://lyncdiscover.mydomain.onmicrosoft.com 
    

和我收到的结果是这样的:

{ 
"_links": { 
    "self": { 
     "href": "https://webdir1e.online.lync.com/Autodiscover/AutodiscoverService.svc/root?originalDomain=mydomain.onmicrosoft.com" 
    }, 
    "user": { 
     "href": "https://webdir1e.online.lync.com/Autodiscover/AutodiscoverService.svc/root/oauth/user?originalDomain=mydomain.onmicrosoft.com" 
    }, 
    "xframe": { 
     "href": "https://webdir1e.online.lync.com/Autodiscover/XFrame/XFrame.html" 
    } 
    } 
} 
  • 我试图在用户URL登录:

    GET https://webdir1e.online.lync.com/Autodiscover/AutodiscoverService.svc/root/oauth/user?originalDomain=mydomain.onmicrosoft.com 
    HEADERS: 
    Authorization: Bearer + theAccessTokenFromAbove 
    Referer: https://webdir1e.online.lync.com/Autodiscover/XFrame/XFrame.html 
    
  • 并在此之后我得到了403无理由。我哪里错了?

    +0

    它比你所拥有的上述比较复杂。你有一个用户访问令牌O365。然后,您需要使用这些凭据登录到Skype for Business Online,最后获取UCWA可用于通过自动发现获得授权的oauth标记。 – ShelbyZ

    +0

    你能告诉我还是指向一个资源,显示如何做到这一点?我不能从我的生活中找出他们所拥有的文件。 – spiroski

    +0

    具体而言,我不确定如何在我的Web应用程序服务器应该能够代表用户安排会议的情况下执行此操作,即使用户未登录到该站点(所以我应该在访问用户不在我的网站上)。 – spiroski

    回答

    0
  • 获取已返回的授权码,并用它来生成令牌
  • 的访问在此步骤中,你需要指定resource=https://webdir1e.online.lync.com资源(请注意1e)以访问此特定中心。

    实际上,您必须从每个新服务器开始进行身份验证,所有webdirXX,然后是webpoolXXXXX。

    我写了一篇巨大的互动文章,详细描述了请求流程(在我花了一周的时间对逆向工程师进行反向工程后,由于MSDN文档是 - 至少在撰写本文时是不完整和不正确的) ,也许它可以使用的:

    如果您配置应用重定向URL文章URL(暂时的课程),你甚至可以直接从那里测试查询。

    此外,自动发现和验证码“在一片”可以在Github上找到(与现场演示):

    相关问题