Hello I have read and followed these Vittorio Bertocci tutorials:
"Secure ASP.NET Web API with Windows Azure AD and Microsoft OWIN Components"http://goo.gl/3y41bb
"Protecting a Self-Hosted API with Microsoft.Owin.Security.ActiveDirectory" http://goo.gl/3y41bb
However instead of a stand-alone API project (as in the tutorials), I have a web application comprised of the following OWIN components: NancyFx & ASP.NET Web API (following the architecture pattern set forth here: http://msdn.microsoft.com/en-us/magazine/dn451439.aspx)As I attempt to implement AAD authentication (as Mr. Bertocci does in his tutorials) into my NancyFx module (to authenticate a user who hits a route requiring authentication):
AuthenticationResult ar = ac.AcquireToken("https://SalesApplication.onmicrosoft.com/Website","97c3d8e0-a601-4858-8d76-8772b4351772",
new Uri("https://SalesApplication.onmicrosoft.com/testClient"));
I get the following error
Additional information: Loading an assembly required for interactive user authentication failed. Make sure assembly 'Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' exists.
clearly the AAD dialog that pops up asking a user to login has a dependency on WindowsForms and shouldn't be invoked from a web application.
What AAD credential prompt should I be using instead?