SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am creating an autohosted SharePoint app. There are tons of really good articles out there that explains how to get started.

Unfortunately, I haven't find any article/tutorial yet which explains how to secure the actual Azure hosted app.

Basically, I have created an ASP .Net MVC 4 based autohosted app. To start with, the Web project has the Anonymous Authentication enabled.
Due to this, anyone who knows the * url of the app can access the app functionality.

But, I would only like to allow the users registered in our Office 365 SharePoint site to have access of the app.

It would be really great to redirect users to O365 site to log-in and then redirect them back to the app. What would be the best way to achieve this functionality?

I would really appreciate if you can please point me to the right direction :)

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.