DEV Community

Discussion on: Secure ASP.NET Blazor WASM apps and APIs with Azure AD B2C

Collapse
 
mihaimyh profile image
Mihai Dumitru

Hi, is there a way to have custom roles defined in B2C and to be used within Blazor Wasm and Api? For example a role for an admin user which exposes other parts of the UI and can call specific API endpoints?

Collapse
 
christosmatskas profile image
Christos Matskas

B2C doesn't provide roles. However, JP has been working on a project to create a B2C compatible role-management solution. Check out our YT video on this: youtu.be/I_ddlSOHvwk

Collapse
 
lockhartlimited profile image
Lockhart Software

Hi Christos

Thanks for your excellent articles.

When will Microsoft.Identity.Web be available for Blazor WASM?

Thread Thread
 
christosmatskas profile image
Christos Matskas

Microsoft.Identity.Web is a server-side library and therefore can't be used in Blazor WASM which is client-side. Blazor WASM uses a flavor of @azure/msal-browser which is designed for JS (client-side apps). I hope this makes sense but feel free to reach out if you have more questions. Make sure to join our Discord as well for more Identity Qs aka.ms/425Show/discord/join

Thread Thread
 
lockhartlimited profile image
Lockhart Software

Thanks Christos. This makes sense.