Jamie
Jamie

Reputation: 3372

Azure Active Directory, OWIN, and ASP .NET MVC

The stock template in VS 2013 does not use OWIN with the Active Directory configuration. Does anyone have an good example of how I am supposed to wire this up with OWIN? I really don't want to mix the paradigms and would like to use OWIN for everything. Do I have to use the OpenIDConnect package?

Thanks,

Upvotes: 0

Views: 836

Answers (1)

Gaurav Mantri
Gaurav Mantri

Reputation: 136196

Azure AD team has published a lot of samples on Github which you can find here: https://github.com/AzureADSamples. Of these, I believe these two may be of interest to you:

https://github.com/AzureADSamples/WebApp-MultiTenant-OpenIdConnect-DotNet

This sample shows how to build a multi-tenant .Net MVC web application that uses OpenID Connect to sign up and sign in users from any Azure Active Directory tenant, using the ASP.Net OpenID Connect OWIN middleware and the Active Directory Authentication Library (ADAL) for .NET.

https://github.com/AzureADSamples/WebApp-WebAPI-OpenIDConnect-DotNet

This sample shows how to build an MVC web application that uses Azure AD for sign-in using the OpenID Connect protocol, and then calls a web API under the signed-in user's identity using tokens obtained via OAuth 2.0. This sample uses the OpenID Connect ASP.Net OWIN middleware and ADAL .Net.

Upvotes: 3

Related Questions