active-directory-b2c-dotnetcore-webapi | NET Core Web API for Azure AD B2C | Azure library
kandi X-RAY | active-directory-b2c-dotnetcore-webapi Summary
kandi X-RAY | active-directory-b2c-dotnetcore-webapi Summary
An ASP.NET Core Web API for Azure AD B2C that shows how to protect your web api and accept B2C access tokens
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of active-directory-b2c-dotnetcore-webapi
active-directory-b2c-dotnetcore-webapi Key Features
active-directory-b2c-dotnetcore-webapi Examples and Code Snippets
Community Discussions
Trending Discussions on active-directory-b2c-dotnetcore-webapi
QUESTION
I would like to set up authorization in a dotnet web api project using Azure B2C with device code flow.
I have successfully set up this sample https://github.com/Azure-Samples/active-directory-b2c-dotnetcore-webapi with my Azure B2C tenant and my custom signin policy. I can obtain an access token using Postman if I select the OAuth 2.0 authorization type.
Now I would like to use Postman to obtain an access token and call my API using device code flow. The problem is I can't find any documentation or sample on how to do this. The docs show how to do this using a regular Azure tenant, not a B2C tenant having a custom singin policy.
I can obtain a device code using Postman and go to https://microsoft.com/devicelogin and use that code, but I can't log in using the users I set up in my B2C tenant. Also, I can't find any way to make it use my own custom signin policy defined in my B2C tenant.
Is there any way to use device code flow with an Azure B2C tenant?
...ANSWER
Answered 2019-Dec-15 at 10:11Based on the documentation https://docs.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-reference-oidc it is not supported.
Only authorization code/hybrid/implicit flows are supported.
QUESTION
I have an existing small app that I use for test, it is in Asp.Net Core 1.1 for both the Web App and the API, the authentication is done using Azure AD B2C. I am trying to move it to .Net Core 2.0 but I can't figure how to get it working, I tried using both sample from GitHub Azure-Samples for Web App and API, but I have either an unauthorized or 500 error when trying to access the api, if you have a working example for calling a web api from a web app using 2.0 and protected by AD B2C it will be greatly appreciated.
Edit: The sample I use to test are : Web App : WebApp-OpenIDConnect-DotNet core2.0 Web Api : B2C-WebApi core2.0 , I changed the appsettings values to match my b2c directory.
For my asp.net core 1.1 test app I use the same samples as above but from the master branch, with the same value for appsettings.
Edit 2 by default, in startup.cs I have this :
...ANSWER
Answered 2017-Oct-05 at 13:39I saw a pull request on the sample which correct this issue (Link), the services.AddAuthentication must be change to:
QUESTION
I am facing an issue with Jwt Authentication.
I have an ASP.NET Core 2 WepApi which also serves my SPA App (Its a Vue-App) The SPA App gets the Token from Azure B2C via the MSAL.js library from Microsoft.
When i hit the WebApi where i need to Authorize i get the following error:
...ANSWER
Answered 2017-Oct-05 at 04:47I have found a solution to my problem.
The correct way to configure the AddJwtBearer()
method is to use the options object which is already provided and not to create a new one.
Bad:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install active-directory-b2c-dotnetcore-webapi
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page