title: Can't authenticate to Skype For Business Online UCWA
body: <p>I'm having trouble authenticating to S4BO. I have registered my app (in azure portal) and it's working correclty with the webSDK demo at <a href="https://ucwa.skype.com/websdk" rel="nofollow noreferrer">https://ucwa.skype.com/websdk</a>
  The process I follow is the following one:</p>
  
  <ol>
  <li><p>I do a OAuth link redirect with the following code:</p>
  
  <pre><code>https://login.microsoftonline.com/common/oauth2/authorize?response_type=code&amp;client_id=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&amp;resource=https://webdir.online.lync.com&amp;redirect_uri=http://myurl.dev/skype
  </code></pre></li>
  <li><p>Get the auth code that has been returned and use it to generate an access token:</p>
  
  <pre><code>POST https://login.microsoftonline.com/common/oauth2/authorize?response_type=code&amp;client_id=db01d1f5-f2a3-4d82-b4bc-6b3b4071d7df&amp;resource=https://webdir.online.lync.com&amp;redirect_uri=http://acme.intranet.dev/skype
  
       grant_type=authorization_code
       code=$thecodehere
       client_id=$clientidhere
       client_secret=$clientsecrethere
       redirect_uri=$sameuriasbefore
  </code></pre></li>
  <li><p>After this I have my access token. Now I need my user url. So I do autodiscover</p>
  
  <pre><code>GET https://lyncdiscover.mydomain.onmicrosoft.com
  </code></pre></li>
  </ol>
  
  <p>and I receive a result something like: </p>
  
  <pre><code>{
  "_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"
      }
    }
  }
  </code></pre>
  
  <ol start="4">
  <li><p>I try to log in at the user url: </p>
  
  <pre><code>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
  </code></pre></li>
  </ol>
  
  <p>And after this I get 403 Unathorized. Where am I going wrong? </p>