What is the best way to configure an application startup.cs to use both Azure AD and Azure B2C in .netcore? I see a lot of referencing indictating to use only Azure B2C, but due to the circumstances I need to use both Identity providers separately giving the users the option to choose which service. But I am not sure how to go about it, and after configuring the startup, how would I use distinct "Authorize" on the actions within the same controller?
2
There are 2 best solutions below
4
Chauncy Zhou
On
You can use the Azure AD B2C custom policy and Azure ad can be set as an identity provider.The end result is as shown below, where users can choose to log in with an ad account.

Related Questions in .NET-CORE
- Repository manager receives the wrong connection string in .net core
- How can I overwrite the localization strings in a library
- Custom type resolution
- How to enable log to console Cosmos Client SDK requests
- Issue with Entity Framework Core: .Include() and .AsNoTracking() not displaying expected related entities
- Using Python CDK to bundle dotnet 8 code to AWS Lambda function
- How to make Visual Studio 2022 project launch Windows Terminal instead of PowerShell?
- Custom Metrics stop saving in App Insight after one hour
- How to send select input data for form submission?
- When I use built-in DockerFile in Visual Studio, I see no errors, but when I try to create image and container using terminal I get an error
- Failure to Execute the DBCommand: SQLite Err. 1 - C# / .NET / Entity Framework Core
- KeyCloak Handshake causing timeout
- problemas con los CORS en .net core 7 y angular 15
- Access Registed Scoped Services and Transient Services using GetService()
- .NET Core DB vs JSON model design
Related Questions in ACTIVE-DIRECTORY
- Is there any way to set a printer as default according with Active Directory Policy Security Group and PC hostname?
- Dropdown list showing SQLServer2005SQLBrowserUser$DONSERVER instead of Active Directory group name in ASP.NET MVC C#
- Connecting to SQL Server and performing BULK INSERT from Linux Container
- Running wmi queries as a non-admin user on a remote machine using C#
- How can we make an environment specific Token-based authorization using Ping Token?
- Reuse SSL certificate from the personal certificate store across services such as RDP and Federated Sign In
- Adding user in AD using powershell
- Netbox in docker LDAP authentication
- PowerShell Script Install-ADDSDomainController Error
- Get username of logged in user while using Domain Admin privileges
- Populate Simple AD from LDAP
- Python LDAP3 Changing Account Values
- Powershell - Exporting MemberOf to csv file from active directory
- Filtering users from a CSV then removing those filtered users from specific security groups with Powershell
- Nested Expression in Powershell returning part of Expression
Related Questions in AZURE-ACTIVE-DIRECTORY
- How to authenticate only Local and Guest users in Azure AD B2C and add custom claims in token?
- Microsoft Entra ID - How to delete a tenant?
- Azure AD guest account in web app authentication user claims data
- Handling errors in MSAL Redirect - reactjs login with microsoft sso
- Azure Cross Cloud Auth using AAD
- Get id token from the access token
- Microsoft Identity does not work in docker desktop
- how to get refresh token in msal-browser Azure AD B2C login?
- Local DX for service-to-service authentication based on Managed Identities in Azure
- How can I add an identity provider to an existing user in an AWS Cognito user pool using the OIDC protocol?
- Azure B2C MFA custom policy flow 'try another way'
- How can I protect an Java Spring boot API against Azure AD B2C if I only have an id_token?
- Is there any way to get a new Azure CLI token without logging out?
- Code a Delegated Permission in Azure Powershell
- Service Principals I create are not being created as mine
Related Questions in AZURE-AD-B2C
- Implementing Azure AD B2C Authentication in .NET 8 Blazor Project (RenderMode: InteractiveAuto)
- B2C Login is showing me an error page after entering credentials. When clicked on Sign in button, it's logging me in without asking for creds
- How to authenticate only Local and Guest users in Azure AD B2C and add custom claims in token?
- how to get refresh token in msal-browser Azure AD B2C login?
- Azure B2C MFA custom policy flow 'try another way'
- Azure AD B2C login getting error The redirect URI 'localhost:3001' provided in the request is not registered
- Azure AD B2C login with Microsoft identity provider error: Proof Key for Code Exchange is required for cross-origin authorization code redemption
- Azure B2C cannot use Okta as IdP via OIDC - 'Signature validation failed'
- Need to pass custom claims to B2C Custom Policy from a React Application
- How to change Azure AD User invite email template and Accept invite link, Currently it's allowing text only, can we make like HTML
- Azure PIM role activation in B2B environment
- How to prevent Login in AD B2C based on an extension claim type using User Flows
- AADSTS9002326: Cross-origin token redemption is permitted only for the 'Single-Page Application' client-type. Request origin: 'capacitor://localhost'
- azure b2c custom policy failed to get access token
- B2c tenant Creation and creation of users/apps from main tenant using terraform. Is that possible?
Related Questions in MICROSOFT-IDENTITY-WEB
- Microsoft Identity does not work in docker desktop
- Generate token console for Intune datawarehouse
- Multiple Bearer Authentication Schemes in ASP.NET Core Using Microsoft.Identity.Web
- The issuer '(null)' is invalid
- Securing Controllers in ASPNET Core with Azure Ad and Azure AD B2C
- Outlook authentication with new MSAL library authorization code flow, On behalf of
- Unable to make Microsoft Graph API request in ASP.NET Core with Microsoft Identity for authentication
- IdentityServer with inheritance design. Update-database error
- Adding claims for roles in a token obtained using MSAL?
- Microsoft Identity with local account and mobile apps
- How to validate the audience in the YARP routes?
- Can I create my own UI project for C# Identity pages?
- How to redirect to a specific web page after sign out from Entra ID
- What are the actual configuration options when calling AddMicrosoftIdentityWebApi(IConfiguration.GetSection());
- how I can dynamically load AzureAdB2C settings based on URL
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Found that adding multiple Azure Active Directory authentication providers in the same app using the current release of the Microsoft Identity Web library is not available (https://github.com/AzureAD/microsoft-identity-web/issues/549 ) but will hopefully be added soon.