4

I m using AddMicrosoftIdentityWebApi .net core 6 . Can I create my custom middleware ?

below is my code.

services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
                
.AddMicrosoftIdentityWebApi(Configuration.GetSection("AzureAd"));

can we add custom middleware for Microsoft identity ?

Lajos Arpad
  • 64,414
  • 37
  • 100
  • 175
  • Please check if you can do [this way](https://stackoverflow.com/questions/58154183/custom-middleware-with-jwt-authorization-isauthenticated-false) by using azuread . see [Reference](https://learn.microsoft.com/en-us/aspnet/core/fundamentals/middleware/write?view=aspnetcore-6.0) – kavyaS May 17 '22 at 16:19

1 Answers1

-1
builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme).AddMicrosoftIdentityWebApi(builder.Configuration.GetSection("AzureAd"));
Jeremy Caney
  • 7,102
  • 69
  • 48
  • 77
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Oct 07 '22 at 19:57