Forum Discussion
JSOM - Access Web API secured with Azure AD
- Aug 21, 2016This is something that will not work as you expect. ADAL relies on that the domains SharePoint site, your web API, (ADFS, ) as well as the login.windows.net are all in the same zone (for internet explorer). This is most often not the case. Users want SharePoint domains etc to be in the intranet zone so that you get the single-sign-on experience with ADFS, Open with Explorer and other, and you do not want login.windows.net to be in the intranet zone, since that will in the end require you to have all Microsoft sites/services in the intranet zone. So, at the moment there is not way to get it to work properly. Unless you can assume all users use Chrome, they don't want SSO and they don't use Open With Explorer.
Hi Kiril,
We have a similar requirment of securing a webapi hosted on azure webapp using Azure AD. We are facing a issue while generating the access token from ADALJs. Please can you share some sample code for this. Kiril Iliev
Hi Mudasar,
We have posted a couple of blog posts on the topic:
https://www.linkedin.com/pulse/using-adaljs-authenticate-against-your-azure-secured-native-iliev?trk=mp-author-card
https://www.linkedin.com/pulse/calling-new-sharepoint-graph-api-from-your-kiril-iliev?trk=mp-author-card
There are code snippets there.
- Mudasar SyedJan 20, 2017Brass Contributor
Hi Kiril Iliev : Thanks for pointing to this links. Yes i had already looked into it while researching. I am getting a below error.
"ADAL error occurred: Token renewal operation failed due to timeout" while using the front end authentication code snippet
Regards,
Syed