Individual User Account in Visual Studio 2017 - asp.net

Can any one please explain this change in "Change Authentication" dialog box. Previously it was easy creating a project with Individual user accounts, but now this is annoying, because I am forced to fill in the options. I couldn't find any help regarding it either, so StackOverflow is my last option. Please refer the image below to understand what I mean. If you find it too silly and unwilling to answer, then please point me to any resource that will help me understand this.

As far as I know, this setting is used to configure Cloud authentication with Azure Active Directory B2C in ASP.NET Core.
Azure Active Directory B2C (Azure AD B2C) is a cloud identity management solution for web and mobile apps. The service provides authentication for apps hosted in the cloud and on-premises.
If you want to configure the Cloud authentication with Azure Active Directory B2C in ASP.NET Core, you should firstly create the Azrue AD B2C and then register the app in Azure AD B2C.
The app inside the Azure AD B2C will contains Application ID and its domain name, then you could use that Application ID, domain name and set Sign_in or Sign_up policy to B2C_1_SiUpIn.
More details, you could refer to this article. Notice: This article is for VS2019 but almost same.

Related

Update ASP.NET Identity Role assignment from Code to Azure AD

I am working on a ASP.NET (Blazor) server which is connected to Azure. The user management works perfectly fine and the data gets written and read to/from Azure. Anyway, I just started to work on user roles.
My first approach was to have a table in the database which contains all my users and I store my custom roles there as well. But with this approach I cannot use the Identity Platform to its fullest.
The second idea was that I use the role management directly from Azure AD. This would give me the possibility to use the Identity Platform better. But in our tool we need to manage the users and roles. Therefore, I need user roles to be updated in our app and then synced with Azure AD.
I searched around regarding this but did not find any solution regarding this. Maybe my approach is completely wrong from the get-go and someone has a completely different idea.
Usually in the Blazor Server projects where I use the Microsoft Identity Platform I use the Azure RBAC (Azure role-based access control).
You can manage the roles using the Azure Portal or the Azure Graph API, you can check Microsoft's documentation for this one too at Add app roles to your application and receive them in the token.

ASP.NET with Windows Azure Active Directory SSO

I already have more than 10 applications developed using ASP.NET. There are different versions for frameworks 2.0, 3.5 and 4. Currently I need to apply single sign on on all of my applications using Windows Azure Active Directory SSO. But I do not know what the code or library should be added to my application to be configured with the Azure SSO. Do I need to re-develop my application or recreate it with different versions? Does anyone know what I should do?
Different .NET frameworks should not be a problem. You should be able to implement SSO for all of these applications, but you will need to add it individually to each one. You will need to add it in the code of the application itself and then register each application to your tenant.
Here is a very good tutorial that shows you step by step how to add SSO to a published web application in Azure using OpenID Connect. You can follow the steps exactly and build their demo version to test it out, or follow their steps at the bottom that show how to implement SSO in your own application.
https://github.com/Azure-Samples/active-directory-dotnet-webapp-openidconnect
Here is the official Microsoft documentation, which also describes how to implement SSO: https://learn.microsoft.com/en-us/azure/active-directory/active-directory-saas-custom-apps
Alternatively, if you want to use a library that is already integrated with Visual Studio, you can go to Project > Add Connected Service > Authentication with Azure Active Directory.
The "SSO" in this case refers to SAML. To do SAML in C#, look into Windows Identity Foundation (WIF), which includes some SAML support.
Note that doing SAML SSO involves more than just dropping in the right kind of username/password field. You need to have additional special pages to handle certain redirects, and have a way to store exchange saml metadata with your Azure AD identity provider. It can be painful.

Azure Multi Factor Authentication for a custom ASP.Net web app

I have created an ASP.Net web app and hosted it on MS Azure where users sign in and are able to log into the system. I am not using Azure AD or on-premise AD but using Azure SQL database. Users are registering on the web app as normal users. I would like to know if there is a way to integrate Azure Multi Factor Authentication with my custom written app.
Any clarifications required, please ask.
From your question it sounds like you're using some kind of ASP.NET identity feature which uses a SQL database as the backend. If so, then you might want to take a look at this article:
http://www.hanselman.com/blog/AddingTwoFactorAuthenticationToAnASPNETApplication.aspx
It shows in detail how to configure multi-factor authentication for an ASP.NET application using ASP.NET Identity 2.0. It should work regardless of whether you're hosting on premise or in Azure.
If you're asking how to integrate Azure AD Multi-Factor Authentication into your existing ASP.NET identity subsystem, then I fear that may not be possible unless you take a dependency on Azure AD as your identity subsystem.

Using AD in windows Azure for user account management

Has anyone implemented a project using Azure for user registration and authentication?
I can see how it would work well in an Enterprise application, but it seems as if there is no easy way to enable "self registration"
It looks like it is intended to work with an on premises AD solution, or alternatively for new users to be added using the Azure management portal.
Can anyone give me the benefit of their experience?
WAAD is a fully implemented solution for what I think you are trying to do, but created in a way very different than the "Active Directory" server product that it shares a name with. Take a look at the Windows Azure Active Directory Graph API, which is the RESTful management API for WAAD. With Graph API you would be able to create a fully functional application authenication system to meet your needs.
Overview
http://msdn.microsoft.com/en-us/library/windowsazure/hh974482.aspx
API Reference
http://msdn.microsoft.com/en-us/library/windowsazure/hh974478.aspx
Links, Examples, etc
http://msdn.microsoft.com/en-us/library/windowsazure/hh974476.aspx

Can I use different authentications for different directory in the same website solution?

I've a website solution separated into two parts - one part is for clients and the other is for service administrators. For the former I would like to use the integrated Form Authentication and for the latter Windows Azure Active Directory that syncs with the on-premise AD server.
Is it possible to specify two directories (locations) that use Form Authentication and Azure AD respectively?
PS: A similar example would be the Windows Azure Management portal, which allows you to log in either with an organizational account either with a Microsoft account.
I guess one solution might be using the "location" tag in Web.config and disabling the inheritance of authentication mode, though I haven't figured out how to get it working up till now.
As long as you can define a web.config with the right authentication mechanism for each module then you should be able to achieve what you want. Note that the logins for the Azure Portal are always claims-based regardless of source (organisational or Microsoft Account).

Resources