Azure AD Authentication on Blazor WebAssembly


Implementing Azure AD Authentication In Blazor web assembly is very much similar to Blazor Server.

Please read the below post to know more details about azure portal configuration for Blazor Server

Step 1: Register the single page application on azure portal like this
Note: donot forget to append localhost URL with authentication/login-callback

Step 2: Select the Access Token and Id Token like this

Now create the Blazor Webassembly project with Microsoft Identity Platform

Now it will install, all the Authentication related nuget package and boilerplate code for us.

Step 3: Go to appsettings.json file and keep the TenantId and ClientId here.

Step 4: Now run the application, It will work as expected.
Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.