How do I authenticate to SharePoint on Prem with Azure Proxy AD and ADAL?

I am trying to call a Rest Host web service hosted on a SharePoint 2013 server published with Azure Proxy AD (as described here: Kirk Evans Blog , I am using Adal for Auth from an Azure AD tenant:

var authContext = new AuthenticationContext(authority, false);
HttpClientHandler handler = new HttpClientHandler() { CookieContainer = new CookieContainer() };
HttpClient httpClient = new HttpClient(handler);
var result = authContext.AcquireToken("https:/AzureADAppUrl", "ID Apps",new UserCredential("login@domain.com","pass@word"));

      

Get me an access token, but even if I use this token in the Bearer authorization header or in the AzureAppProxyAccessCookie . I get a 302 redirect response when requesting a WCF web service: Auth is not recognized ... How can I authenticate to an Azure AD Proxy enabled Sharepoint server?

+3


source to share


1 answer


App proxy currently only supports interactive authentication, so you cannot publish the API using the service.

You are not the first to ask this question, so we are looking into how to enable this in the future.



Disclaimer: I work on the App Proxy team :)

0


source







All Articles