Laut
Dokumentation verwendet das ASP.NET 5 Template AddMicrosoftIdentityWebApp() und damit das Code Flow Setup. Gerade getestet, das ist auch so:
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddAuthentication(OpenIdConnectDefaults.AuthenticationScheme)
.AddMicrosoftIdentityWebApp(Configuration.GetSection("AzureAd"));
services.AddAuthorization(options =>
{
// By default, all incoming requests will be authorized according to the default policy
options.FallbackPolicy = options.DefaultPolicy;
});
services.AddRazorPages()
.AddMvcOptions(options => { })
.AddMicrosoftIdentityUI();
}
Dass alte Templates das vielleicht noch nicht tun; nagut, nachvollziehbar.