title: External REST Service Authentication from SharePoint Online
body: <p>Often creating complex business application using SharePoint Online, I need to externalize business logic to external service in order to use .net code and third-party assemblies.</p>
  
  <p>In my case I'm developing a Rest Service hosted by an Azure Web Site.</p>
  
  <p><a href="http://i.stack.imgur.com/X1W7q.png" rel="nofollow">Here my architecture</a></p>
  
  <p>My question is:</p>
  
  <p>Can I obtain an access Token from SharePoint, containing the current user information, pass it to external Rest Service and then reuse it to return and autenticate the user to SharePoint using the current user credentials?</p>
  
  <p>This service is called from both JavaScript code both 2013 workflows</p>
  
  <p>Can you give me documentation about it?</p>
  
  <p>Thanks,</p>
  
  <p>Sergio</p>