codewithiulian / BlazorMsalExample

A Blazor WebAssembly app, ASP.NET Core hosted with integrated MSAL (Azure AD SSO)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BlazorMsalExample

A Blazor WebAssembly app, ASP.NET Core hosted with integrated MSAL (Azure AD SSO)

Installation

  1. Create an Azure AD Application. For this type of app, this will be a Single-page application. Set the redirect URI as https://localhost:7268/authentication/login-callback. Notice, the port can be found in your Blazor Server project, under Properties > launchSettings.json > https > applicationUrl (the https one)
  2. In Client/wwwroot add an appsettings.json file with the following structure:
"AzureAd": {
        "Authority": "https://login.microsoftonline.com/TENANT_ID_HERE",
        "ClientId": "CLIENT_ID_HERE",
        "ValidateAuthority": true
    }

About

A Blazor WebAssembly app, ASP.NET Core hosted with integrated MSAL (Azure AD SSO)


Languages

Language:HTML 47.7%Language:CSS 33.1%Language:C# 19.3%