Connect your Blazor Web App to Microsoft Entra ID (.NET 8)

preview_player
Показать описание
In this video I will show you how you can configure your .NET Blazor Web App (.NET 8) to connect with Microsoft Entra ID. I used the Microsoft.Identity.Web NuGet package to create the connection, and I will show you how to register the Blazor Web App in the Microsoft Entra admin center.

⏲ Chapters:
0:00 Intro
0:24 Create Web App project
0:43 Missing Identity platform configuration
1:29 Inspect created projects
1:47 Show InteractiveAuto mode
3:40 Register the app
4:29 (Optional) Add app to user flow
4:42 Connect registration to Web App
5:37 Test
6:23 Authorization per component
6:57 Outro
Рекомендации по теме
Комментарии
Автор

Very easy to follow & clear. Thanks, you've saved me a lot of time upgrading my applications to .NET 8!

Opilio
Автор

Thanks, easy to learn step by step, 👍

KanokpitsunLertprommakul
Автор

Great! So Nice with a simple demo. It works :). But unable to logout? Hmmmm How is that done. Not as easy or im missing something :)

bohansen
Автор

Very instructive video, but I only have one question: how can I implement a logout?

lufve
Автор

Great video, thank you. One question, is there anything you need to configure on the client side project for Entra ID?

Clairvoyance
Автор

I couldn't help noticing the cat box, I have exactly the same one, but I don't have a cat yet ;-/
I wonder if you need a cat at home to be a good programmer.

miguelblanco
Автор

Hi! Thanks for viseo. can you please make a tutorial of aspNet web api + Blazor webassembly standalone app (not a `BlazorApp` or `Blazor Server` templates) Identity auth tutotial (new way, .net 8)? register, login, logout features

JohnSmith-yrih
Автор

/authentication/logout results in a 404 for my Blazor App which mirrors yours in this tutorial

pvanroos
Автор

Just what I needed - brief and complete - thank you.

bigdan
Автор

Probably might save some folks a bit of time and frustration: to log in you need the full principal name not just the first part. If you only type the name part you'll get "invalid_request: The provided value for the input parameter 'redirect_uri' is not valid. The expected value is a URI which matches a redirect URI registered for this client application."

Now don't let that fool you, you set up everything correctly, no need to triple check your redirect uris for typos. What I think is happening in the background is that a name is found in SOME tenant, but most likely not yours and that causes the issue. You can clearly see the difference if you type in some nonsense random string as username: "We couldn't find an account with that username.".

majormartintibor
Автор

Thanks for sharing. Have you found a way to pull in application roles from the Entra ID enterprise application. If I create some custom roles in the app manifest I cant seem to use them with [Authorize(Role = "Admin")]. Maybe its not supported.

liam