Тёмный

Why and How Use Azure Active Directory (AAD) with Blazor Web Assembly (WASM) 

Frank Boucher
Подписаться 13 тыс.
Просмотров 14 тыс.
50% 1

Опубликовано:

 

30 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 76   
@fboucheros
@fboucheros 3 года назад
What would you like to see in a video about Azure Identity? Give me scenario example.
@loladeking
@loladeking 3 года назад
Add AAD to an existing blazor app or xamarin app? Awesome video
@arestlessmindband
@arestlessmindband 2 года назад
Excellent video Frank, still holds up and works in 2022! Looking forward to seeing your other videos
@newyearshiphop
@newyearshiphop 2 года назад
Salut, c'est bien de voir un québécois faire ce genre de vidéo ? Ce serait vraiment de voir comment on peux faire le login flow sur mesure sans un pop-up. Ce serait bien de voir un flow qui reste toujours dans l'application. Bonne journée !
@DieterStapelberg
@DieterStapelberg 2 года назад
Hey Frank, short, sweet and to the point. Great introduction. Subbed.
@sridharsathya8719
@sridharsathya8719 3 года назад
Frank, I love your passion and enthusiasm to share your knowledge. Got me started using AAD in 10 minutes or so! Thanks.
@fboucheros
@fboucheros 3 года назад
Fantastic!
@ecwb
@ecwb 2 года назад
That was exactly what I needed to see what a short perfect video, perfect many thanks Frank!
@mwonsil
@mwonsil 3 года назад
In .Net 5,, I learned to use the SPA platform when registering a Blazor WASM app otherwise I would get a Missing Secret error. Great video!
@asrajan55
@asrajan55 2 года назад
same here
@BiswameetHui
@BiswameetHui 3 года назад
Can you please throw some more light onto the last part i.e the user role based authentication that you did? If i have to show/hide a component based on a user role, what all do I need to set up?
@gmddmg
@gmddmg 3 года назад
Hello from Uruguay! Great video. Keep going!
@fboucheros
@fboucheros 3 года назад
Thank you! Will do!
@talksis
@talksis 3 года назад
wasm is SPA.so.. 3:33 Should I set Redirect URI type to SPA?
@HMarkman
@HMarkman 2 года назад
Frank thank you for your videos, it is very helpful. It works while I am in the Visual Studio by when I try to move to IIS it fails, do you have any hit?
@fboucheros
@fboucheros 2 года назад
Thank you. I would need the error message to have a better idea... If you found already the solution please share it so others can benefits of it.
@Duelweb
@Duelweb 2 года назад
In the Azure portal, you set the application as WEB application, but it should have been registered as a SPA application ?????
@igor19781978
@igor19781978 3 года назад
Heavy thumbs up
@shatvani
@shatvani Год назад
Thank you for tutorial but I wonder how to configure/implement Azure AD SSO with Blazore WASM and Web API, please.
@Sam-pj4sb
@Sam-pj4sb 3 года назад
Thanks for the tutorial! How different will this be with Blazor Server instead of Blazor Web Assembly?
@fboucheros
@fboucheros 3 года назад
Mostly the same. If you create a new Blazor App (server) following those step it should works.
@Sam-pj4sb
@Sam-pj4sb 3 года назад
@@fboucheros Brilliant, thank you Frank
@rogermills3298
@rogermills3298 3 года назад
@@fboucheros Do you know how to set this up with Blazor Server to where I don't have to be authenticated when the site loads? I want to make a blazor server app that works just like you have in the demo. Where you log in when you navigate to the counter page.
@fboucheros
@fboucheros 3 года назад
Yes. I show how to lock a page at 00:08:21, but if you don't use the "Autorize" attribute the page won't be protected. And pages like login, error, home, about or contact are often public... because you want every one to see them. Good question!
@ia5687
@ia5687 2 года назад
I'm currently working on an existing Blazor WebAssembly Hosted app and trying to implement the Microsoft Identity platform. I've got it to the point where it attempts to log in but it returns an error each time "authorization failed. these requirements were not met: denyanonymousauthorizationrequirement: requires authenticated user". I've been finding that a lot of the documentation and answers on stack overflow tend to focus just of WASM which isn't hosted. Is there a correct way to implement this in a Blazor WASM Hosted application?
@adipati27ma
@adipati27ma 2 года назад
Great content.. but I have a question... how to integrate the AAD as in the video, but for "role" data is retrieved and defined via fetching custom backend API? do I have to stick with "create project" with "-au SingleOrg"?
@fboucheros
@fboucheros 2 года назад
You don't have too. It's one way to do it, I was starting from nothing and it was a quick and simple way to do it.
@guilhermemolin
@guilhermemolin 3 года назад
Great video, helped me a lot!
@fboucheros
@fboucheros 3 года назад
You're welcome!
@BiswameetHui
@BiswameetHui 3 года назад
Facing an error while trying to log in: blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. Any idea how to fix this? Thanks!
@fboucheros
@fboucheros 3 года назад
Great question @Biswameet Hui, yes go in the Azure portal and select the Azure Function or webapp you are trying to reach. From the left menu search for CORS. Add your source url (where are you calling from) and save. It should fix the problem.
@HMarkman
@HMarkman 3 года назад
Please how to create the roles in the cloud?
@fboucheros
@fboucheros 3 года назад
Great question @helvio Markman, I did a video very similar to this one on Ch9 (channel9.msdn.com/Series/Azure-Tips-and-Tricks-Static-Web-Apps/How-to-secure-your-C-API-with-Azure-Static-Web-Apps-13-of-16--Azure-Tips-and-Tricks-Static-Web-Apps#time=6m34s) and I show how to create roles in it.
@hurolinci5986
@hurolinci5986 Год назад
good video pal.
@asrajan55
@asrajan55 2 года назад
The platform type "web" option does not work for me. Only the "SPA" option works. @ 3:14 in the video
@fboucheros
@fboucheros 2 года назад
I think you are right, they updated the services. That means I need to redo this video 😅
@JensChr.I.Thomsen
@JensChr.I.Thomsen Год назад
what if i have an existing blazor server app that uses database to login. can i add azure ad to that?
@fboucheros
@fboucheros 11 месяцев назад
I'm pretty sure it will required some light refactoring... But that's and interesting migration project. I'll put that on the video ideas!
@BernhardHofmann
@BernhardHofmann 4 года назад
Great video, thank you. You have a new subscriber. 🙂
@fboucheros
@fboucheros 4 года назад
Welcome aboard!
@kourosh234
@kourosh234 Год назад
Where do you add your account in administrator role?
@cissemy
@cissemy 2 года назад
Great How can I create registration page within my blazor app without going to azure portal ?
@cissemy
@cissemy 2 года назад
So Sorry .I am seeing the signin link.
@MlySultan
@MlySultan 3 года назад
Great job, merci
@asrajan55
@asrajan55 2 года назад
What is the color scheme/theme you use in this video? I love it.
@fboucheros
@fboucheros 2 года назад
In VSCode it's called Cobalt2 marketplace.visualstudio.com/items?itemName=wesbos.theme-cobalt2
@abannsunny3515
@abannsunny3515 2 года назад
Great video! How do you authenticate an api back end with the same authentication scheme as the UI?
@io_inc
@io_inc 3 года назад
Could you please make a console application example as well
@asrajan55
@asrajan55 2 года назад
How do you create the blazor app in Visual Studio?
@fboucheros
@fboucheros 2 года назад
Sorry for the late response. If Visual Studio is up to date you should have the option from the menu. Here a step by step tutorial: dotnet.microsoft.com/en-us/learn/aspnet/blazor-tutorial/intro
@TellaTrix
@TellaTrix 3 года назад
Where did you add Role ? is it in Azure ?
@fboucheros
@fboucheros 3 года назад
Yes the role "Adminiostrator" already exists in Azure Active Directory and because It's my subscription I was already part of it. To see the roles go in the AD inside the portal.
@prakashbuddhabhatti1725
@prakashbuddhabhatti1725 4 года назад
Can you please describe role based authentication? I have added roles in the application manifest. I get the role info in token if I decode it but in authorized view Roles="AssignedRole" always failed.
@fboucheros
@fboucheros 4 года назад
If you code is in GitHub, StackOverflow, or somewhere please share it, it will help me. Otherwise, I will try to do a little identity series soon.
@prakashbuddhabhatti1725
@prakashbuddhabhatti1725 4 года назад
@@fboucheros github.com/prakash2912/BlazorwithAzureAuth you can find my sample code in the repository and I also mentioned issues I am facing in the readme file. It will be very helpful to me. I tried a lot to resolve the issue but not getting any solution.
@prakashbuddhabhatti1725
@prakashbuddhabhatti1725 4 года назад
@@fboucheros Hi Frank. Did you get a chance to look into my code. I tried a lot but not able to resolve the issue.
@abhilashbhanot1850
@abhilashbhanot1850 3 года назад
@@prakashbuddhabhatti1725 Hey did you get any solution to this As i am also facing the same issue
@prakashbuddhabhatti1725
@prakashbuddhabhatti1725 3 года назад
@@abhilashbhanot1850 No I didn't get the solution
@honestcommenter8424
@honestcommenter8424 Год назад
Will it still work if you deploy to Azure?
@fboucheros
@fboucheros 11 месяцев назад
the Identity? yes
@honestcommenter8424
@honestcommenter8424 11 месяцев назад
@@fboucheros when I tried a simple blazor the Google sign in button appears and works locally, but when deployed to Azure the button doesn't even show up. Can you please make a tutorial on how to do it?
@andrewsheley
@andrewsheley 3 года назад
How do you get the roles from azure ad?
@fboucheros
@fboucheros 3 года назад
At 10:29 using the attribute [Authorize(Roles = "")] that's when I check if the role is present.
@akdmkz9926
@akdmkz9926 3 года назад
this is very helpful but I have a problem. after logging In, it stuck in loading and I am not able to accept the permission. I tried 3 project but still same behavior. what is the possible problem in my case?
@fboucheros
@fboucheros 3 года назад
Try in a different browser or in a "In Private" session. Do you still have that problem?
@Rajeshsingh-ws5th
@Rajeshsingh-ws5th 3 года назад
is Implicit flow safe? if yes then no issue , if not then why are you not explained it?
@fboucheros
@fboucheros 3 года назад
What do you mean by "Implicit flow"?
@Rajeshsingh-ws5th
@Rajeshsingh-ws5th 3 года назад
@@fboucheros expected PKCE flow.
@cjsalda
@cjsalda 3 года назад
you miss the entire active directory configuration part
@fboucheros
@fboucheros 3 года назад
missed it? What would you like to see?
@cjsalda
@cjsalda 3 года назад
@@fboucheros configure roles and groups and how to add them as part of claims in the Blazor server app
Далее
SEC000: Securing Blazor & Web APIs with AAD
30:25
Просмотров 9 тыс.
Blazor WebAssembly authentication with Azure AD
59:53
Blazor Web Apps - Goodbye JavaScript! I'm in love with C#
1:26:14
Blazor Azure B2C Authentication and Authorization
29:07