I have a Web API protected by using Bearer tokens form Azure AD (https://azure.microsoft.com/en-us/documentation/articles/active-directory-devquickstarts-webapi-dotnet/). Now, I would like to call this Web API from a provider hosted SharePoint AddIn with the signed on SharePoint Online user. Is there any option to use the SPO user token (posted as SPAppToken by appredirect.aspx) to access the Web API or to acquire a new token from AAD with the SP user token?


  • Hello Matthias, we have the same requirement. Can you share if you figured it out and what solution you did? Thanks
    – Water
    Jul 8, 2019 at 13:56

2 Answers 2


As per my understanding, you are asking about Single sign on (SSO) and one way to achieve that is ADFS. Configure your Office 365 as ADFS authenticated, and configure web API authenticated mode to ADFS. i have tested this in our MVC Application hosted in Azure and it is working as SSO.

To configure ADFS You can check below link

http://office365support.ca/setting-up-ad-fs-and-enabling-single-sign-on-to-the-new-office-365/ https://support.microsoft.com/en-in/kb/3061192


There is an options which can be used is called Microsoft OWIN framework. You can add the nuget package and it can be used to authenticate to the application using SP user token from SharePoint. So, all your Web API can be accessed using SP user token. Let me know if any questions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.