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
- NLog with DNX Core 5.0
- How should I reference HttpClient for dnx451 and dnxcore50?
- DNX Core 5.0 library to target any platform. No System.Random class. Workarounds or options?
- Kestrel Running which framework?
- Directory.CreateDirectory not exists in .NET Core
- asp.net dnxcore50 load assembly by file path
- .NET Core doesn't depend on any installation?
- Why is linq to object implementing iterators manually?
- Microsoft Band and WPF
- Determine port in asp.net core
- ASP.NET Core IISIntegration.Tools and .NET Framework
- ANTLR 4.5.3 C# lexer fails to initialize (ATN UUID error)
- Opening Visual Studio 2017 projects in Visual Studio 2015
- dotnetCore (1.0.0-preview2-1-003177) - build warnings as errors - how?
- How to implement interface of C# use COM of native C++?
Related Questions in ACTIVE-DIRECTORY
- PowerShell Script to add newuser
- Active directory and linux nslcd binding without extending the AD schema
- Retrieve user information from Active Directory on login
- Feeding Variables in new-aduser -path option in powershell
- Log in through active directory
- Swapping attributes in AD
- How to get LastLogon from ALL Domain Controllers
- Getting LastLogon and LastLogonTimeStamp from ALL Domain Controllers into 1 output CSV
- Spring LDAP Context.REFERRAL to follow
- Avoiding Active Directory Uniqueness Constraint Violation During Rename
- samba retrieving users with arbitrary attributes
- WinApi and work with several domains
- Tomcat LDAP User Auth
- how to add multiple Owner in ADLDS groups
- Zend Framework Active Directory authentication
Related Questions in AZURE-ACTIVE-DIRECTORY
- MultipleTokensMatched exception when using default TokenCache
- How can I share Azure Active Directory authentication between server side and client script?
- Azure AD Change Password with patch call
- Azure Active Directory Login: Web App Permissions, User Consent not triggered
- ADALJS Error description:AADSTS65001: No permission to access user information is configured for 'clientId' application, or it is expired or revoked
- app is re-initializing the first time ADAL "protected" URL is accessed via $http
- Validate access token for WEB API protected by Azure AD
- Azure AD Graph API: Is it possible to enumerate all groups associated with an application role?
- Is is possible to use Azure AD as a SAML compliant Identity Provider?
- Microsoft Graph API Accessing basic info of a user that is outside tenancy
- RoundCube OAuth with Azure Active Directory
- Deploy Azure AD WebAPI to IIS, with Windows Authentication enabled, skips Azure AD Authentication
- How to change Is Multiple Resource Refresh Token to true in Azure AD authentication?
- Azure, login to separate accounts with one email
- How to setup nginx to authenticate users through Azure AD?
Related Questions in AZURE-AD-B2C
- In theory, is it possible for Azure AD or B2C to leverage the Facebook SDK for auth?
- Azure AD B2C - Sign out a user from all sessions
- How to get Azure AAD B2C "forgot password" link to work
- Can Azure AD be used with SAML based Identity Providers?
- how to create an ad-b2c tenant under existing subscription
- Microsoft graph explorer - create user & update sign in username /email
- Create Reset Azure AD Password functionality
- Azure B2C: How do I get "group" claim in JWT token
- http 400: size of header request is too long when signing in user using Multifactor authentication
- How to deactivate and reactivate user in Azure AD B2C
- Can we change email address of user from "Profile editing policies" in Azure AD B2C?
- Azure AD B2C self service password reset link doesn't work
- Can I use Azure B2C to get an id token *and* get access tokens for my Azure-deployed services?
- ad b2c allow user to change MFA setting
- Can I share the same KeyVault between Azure B2C, and Azure B2B (AAD)?
Related Questions in MICROSOFT-IDENTITY-WEB
- How to validate the audience in the YARP routes?
- Microsoft Identity with local account and mobile apps
- Adding claims for roles in a token obtained using MSAL?
- IdentityServer with inheritance design. Update-database error
- What is the best way to configure an application startup.cs to use both Azure AD and Azure B2C in .netcore? I am new to Identiy providers
- 'AuthenticationBuilder' does not contain a definition for 'AddMicrosoftIdentityWebApp'
- Calling a secured Web API on behalf of another Azure App Service
- Adding Permissions to Claims - Microsoft.Identity.Web & B2C
- Azure B2C SSO for Hosted Wasm Blazor and Classical Web Application
- Capture Events From Microsoft.Identity.Web Login/Logout
- MSAL4j - How to handle MsalThrottlingException?
- How to authenticate user using Microsoft Share To Teams Button?
- Microsoft Identity Web generating http instead of https for redirect_url
- When using DefaultAzureCredential, web app tries to use ManagedIdentityCredential on local computer
- Is it possible to set a discovery URI for token acquisition in Microsoft.Identity.Web?
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 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.