What's New in .NET 7 for Authentication and Authorization

Let’s explore the new .NET 7 features for improving and simplifying authentication and authorization support in .NET applications.
Read more…

:writing_hand:t2: Brought to you by @andrea.chiarelli

1 Like

I appreciate the information and advice you have shared.

Thank you very much for your kind feedback, @neskemiquel! :pray:

I don’t see the top level Authentication object on the WebApplicationBuilder in .Net 7. Are you sure this made it in the final .net 7 release?

Hey @HWouters,
You are right. The code snippet used the Authentication object that was present in one of the previews but was removed in the final release of .NET.
I updated the code with the correct statement.

Sorry for the inconvenience and thank you for reporting it! :pray:

Notice that now you don’t need anymore to call UseAuthentication() and UseAuthorization() .

You definitely still need UseAuthorization() if you still want problem details.

1 Like

Hi @davidhenley,
Thank you for pointing out this. Actually, you need UseAuthorization() when you need to customize the default behavior of the authorization middleware. I should have specified this more clearly

1 Like

This post is 404 or am I missing something?

I just tested it and it works. Here’s the link: What's New in .NET 7 for Authentication and Authorization

1 Like