/aspnetcore-idsrv-aad-example

ASP.NET Core apps secured by IdentityServer4 with Azure AD

Primary LanguageC#

aspnetcore-idsrv-aad-example

Example of two ASP.NET Core 2 MVC and Web API apps secured by IdentityServer4 using Azure Active Directory as external auth provider.

Configuration

  1. Install .NET Core 2.0
  2. In IdSrv's Startup.cs add your Azure AD Application ID.
services.AddAuthentication()
                .AddOpenIdConnect("AAD", "Azure Active Directory", options =>
                {
                    {...}
                    options.ClientId = "[Your Azure AD Application ID]";
                    {...}
                });
        }
  1. Set API, Client and IdSrv projects to start at startup and hit run.