Question

If I have an Office 365 Business plan, can I build an ASP.NET MVC and authenticate against Office 365 AD? or do I still need to create a separate AD on Azure and connect to it?

Was it helpful?

Solution

If you have an Office 365 account, you have an Azure Active Directory. When signing in to Azure, you'll have to make sure you choose to use your admin organizational account (and sign up for a free trial if you haven't yet done so). Once in the Azure portal, click on 'Active Directory' and you will see that you already have a directory.

Now, as far as MVC web application, check out the Azure Active Directory Samples on GitHub. Also be sure to look at some different scenarios which are documented on MSDN. In particular, I'd recommend looking at the WebApp-GraphAPI-DotNet which is a MVC application authenticating with OpenID Connect against Azure AD, and using this to query the AAD Graph API for details.

(Edit: updated links to new material.)

OTHER TIPS

I would recommend you to get a azure enterprise account and you should federate your users to Azure AD and then register your MVC application with Azure Active directory to get single sign-on capability.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top