14

I have an existing ASP.NET MVC application using Visual Studio 2013. I followed this walk-through but it only concerns itself with a new greenfield project while selecting Change Authentication in project template: Developing ASP.NET Apps with Windows Azure Active Directory

I am not interested in using OWIN and OpenID Connect Katana modules as these components have lots of issues so I am waiting for that technology to mature and render out all the current problems.

I aim is understand how to manually add all the components and configuration to my existing ASP.NET MVC application to achieve the same Azure AD authentication model in Rick Anderson's article.

2 Answers 2

18

The tooling in VS 2013 doesn't support adding this to an existing project. At the bottom of the link you referenced in the More Information section is a deep dive article where I dissect the code and configuration that gets added. So, you could use that as a reference to find the deltas and apply them to your project.

Now, Visual Studio 2015 offers us some hope in this scenario. It's in preview of course, but you may give it a try. In Solution Explorer, right click on your existing project and select the Configure Azure AD Authentication option.

enter image description here

Sign up to request clarification or add additional context in comments.

4 Comments

I ended up using your article to add components piecemeal and it works!
Is there a way to handle an event like the OWIN equivalent SecurityTokenValidated because I want to add custom claims?
@puri, this is an old post, but towards the middle he talks about adding claims: cloudidentity.com/blog/2013/01/22/… (the section on enrichment)
this shows an incompatible authentication configuration was found in this project. My current project was under windows authentication. I tried removing windows authentication on the project in project properties and in web.config.
18

In Visual Studio 2017 the option to enable Authentication with Azure Active Directory is in Connected Services:

enter image description here

enter image description here

1 Comment

Hi, I am not able to see the option Authentication with Azure Active Directory in VS 2019 Professional edition

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.