Azure MFA on premisse webapp - c#

I have a webApplication (webforms) in my domain, authenticated through Active Directory, now I want in a determinate action in a form ask for a second authentication method like Microsoft MFA. ¿Is this possible?.
My active directory is syncronized with Azure AD (because Office 365).
Thanks for you help.

Your on-premises Active Directory is synchronized with Azure AD. For all the directly cloud only apps you will avail MFA directly either by CA policies or enabling at the user level.
In order to have MFA for on-premises application you can configure Azure Application Proxy with AAD Pre-authentication and implement MFA via Azure MFA service. You can also leverage Conditional Access , Azure MFA and Azure AD Identity protection for this purpose as well.
I would recommend you to go through this two links in order to get more detail about Azure AD application proxy.

Related

Where is AAD users-default-permissions (UserSettings) in Azure API (Graph or REST)?

I can't find a way to bring the data of "Restrict member users default permissions" -> "Users can register application" (https://learn.microsoft.com/en-us/azure/active-directory/fundamentals/users-default-permissions) in Azure API Rest or Graph.
I use "Get-MsolCompanyInformation" from powershell. I wanted to do this without logging in with an azure interactive account, but using an account and application using .NETFramework
How get the values programmatically?
Thanks in advance.
You can only manage these settings under user settings in Azure AD portal or using Azure AD MSOL module Get-MsolCompanyInformation and no API way to control as of today.
If you use msol module (Get-MsolCompanyInformation) which leverage Azure AD connect provisioning endpoint https://provisioningapi.microsoftonline.com/provisioningwebservice.svc (SOAP request based) to retrieve UserSettings which can't be used out of box like Graph API way.

Azure B2C how to mantain user session between a .net web app and a SPA(react)

We are using Azure B2C to manage authentication in our c# .net web app through Open Web Interface for .NET (OWIN) middleware components.
We also have a SPA on react and here we are using MSAL.js to authenticate the user
the SPA is gonna be open from the #.net web and we want to maintain the user session between these 2 apps.
currently, the user has to login when he goes from the .net app to the SPA or vice-versa, even if the user was already login
if somebody can point me out in the correct direction I'll appreciate
Configure session behavior in Azure Active Directory B2C (includes 'User Flow' and 'Custom Policy' in separate tabs)
Single sign-on session management in Azure Active Directory B2C
How to configure SSO for Azure AD B2C?
For example, below is in signin user flow.

MVC Web App - Azure AD and External Account

I am new to Azure and hence need someone to guide me. I am trying to build a web app where internal users can be authenticated via Azure AD and external users via their external/social account. I understand Azure B2C allows for that approach. Below is what I have found:
Internal users on Azure AD - https://learn.microsoft.com/en-us/azure/active-directory-b2c/identity-provider-azure-ad-single-tenant
External users - https://learn.microsoft.com/en-us/azure/active-directory/saas-apps/gigya-tutorial
Sample MVC Code - https://github.com/Azure-Samples/active-directory-aspnetcore-webapp-openidconnect-v2/tree/master/1-WebApp-OIDC/1-5-B2C
Can someone please help me with the following:
Am I correct in my approach and the sample MVC code?
Theoretically, how will the MVC web app know when to redirect to internal and when to external provider on B2C tenant?
Will all internal users be available in my B2C tenant?
here is some documentation on how to do this:
https://learn.microsoft.com/en-us/azure/active-directory-b2c/identity-provider-azure-ad-multi-tenant-custom?tabs=app-reg-ga
you need to create a policy that allows for multiple tenants in b2c. then add the claims provider for your allowed "azure ad tenants"

Unable to add or update Azure AD application

I'm trying to plug Azure AD Authentication to my MVC project.
and each time I try to connect the service these errors appear to me.
I checked the previous authentication into "packages.config" -"Web.config" and everything is clear.
also, I checked the client id, clientSecret, Redirect URL, Azure Domain and everything was right!!
what's is the problem here so I can't move forward with it?
Actually this kind of service linking Azure AD with needs permissions more that User.Read ,
because maybe it will change something in the Azure AD App.
so I change the project to authorize directly to Azure AD without that Service by edit the code manually.
I noticed that were adding Read directory data permission to the application. So you must have checked the permission when configure Azure AD Authentication.
Try to login Azure portal with the account which you used to configure Azure AD Authentication in Visual Studio. Find your application and check if you can add Directory.Read.All permission successfully.
If you can add it successfully, try to create a new Azure AD application when configure Azure AD Authentication.

Azure AD and Office 365 authentication for apps

I am learning about Azure AD and Office 365 and I am wondering if the following is possible and if so, how to go about doing it since I am confused on a few aspects with documentation:
Say a company, CompanyA, has Office 365 for users of their org. These users use Exchange/Outlook and Office to sign in (Office desktop) using their Office 365 creds.
CompanyA has Active Directory hosted internally but they are planning to use Azure AD Connect Sync to sync all objects in AD into the Azure AD so things like password changes are synced (and user objects) between the cloud and internal network.
Is there a way to use their Office 365 creds to log into their network systems and sync to AD or perhaps link the Azure AD to their Office 365 accounts so they can log into the computers using their Office 365 creds?
Question 2 is below (the real question I had!):
Now, there will be a custom app hosted both internally but also externally (possibly in the Azure cloud). The app could be a desktop app or a web app or some service.
Is there a way for the apps to authenticate against Azure AD/Office 365 to ensure that the user logging in (using their Office 365 creds) is successful? Is there an automated way without a popup dialog so everything is done programmatically via the API's using C#/.NET Framework?
Thanks!
When you reference Office 365 credentials you are already talking about Azure AD. Every Office 365 tenant has an Azure AD instance backing that is the store for user accounts and credentials. Please sees the following article for a detailed description:
https://support.office.com/en-us/article/Understanding-Office-365-identity-and-Azure-Active-Directory-06a189e7-5ec6-4af2-94bf-a22ea225a7a9
You are currently the model referred to as Cloud identity. It sounds like you want move to Synchronized identity or Federated identity.
If you configure your Azure AD Connect installation to synchronize to your Office 365 tenant (by giving it a Global Admin from the tenant during setup) then you will effectively have the setup you want with premise ADDS credentials synchronized with your Office 365 (Azure AD) credentials.
However, since there is an existing tenant with accounts that you want to match with on-premse accounts, you will need to communicate this with your users in advance and also read up on how the soft matching works when synchronizing to an Azure AD with existing accounts.
This KB article should get your started: https://support.microsoft.com/en-us/kb/2641663
If done properly, the end result will be as follows:
User accounts and password changes are managed from your on-premise AD.
Password changes happen on premise and are synchronized with your Azure AD accounts that are matched to premise accounts
You will not be able change passwords from Office 365 and have those changes reflected on-premise unless you enable Password Write-back which requires a an Azure AD Premium subscription.
Users will login to domain resources using their AD credentials, which match their Office 365 credentials in Azure AD
At this point you will have moved to Synchronized identity. This is required to take the next step to Federated identity so you will want to get to this stage either way. I would not take the next step to federated until you fully understand the implications of that model.
Regarding part 2 of your question, there are multiple libraries that can add authentication to Azure AD to your custom applications. This page has a list of libraries by language:
https://learn.microsoft.com/en-us/azure/active-directory/active-directory-authentication-libraries

Categories

Resources