Aug 20 2016 01:14 PM
Any sample code on how to access an Azure AD secured web api from JSOM? I have see the samples with ADAL and those are mostly SPA applications. I want to access this from a script embedded in a script editor web part.
Aug 21 2016 06:35 AM
SolutionAug 22 2016 01:44 PM
Thanks Wictor for the response. This is a real pain when migrating on-prem solutions which require integrations to on-prem systems. Not all wants to maintain an on-prem SharePoint server or use additional Azure paid services :)
Aug 23 2016 07:26 AM
We have successfully implemented Azure AD secured Web API utilizing our own wrapper over Adal.js library. The sole purpose of the wrapper was to provide a silent login experience.
Out of the box the Azure ADAL.js would redirect you to the login page of Azure where your users login would login automatically (SSO experience) if they are already logged in SharePoint.
We are yet to find a way to create a SharePoint client context on the server using the adal token generated for the authentication. If anyone has encountered this, please share. :)
Jan 19 2017 01:11 PM
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
Jan 20 2017 02:49 AM
Hi Mudasar,
We have posted a couple of blog posts on the topic:
There are code snippets there.
Jan 20 2017 07:41 AM
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
Aug 21 2016 06:35 AM
Solution