Azure Active Directory Bearer Authentication for .NET Core
in your Startup.cs
, in ConfigureServices
(replacing these values with those provided through Azure AD):
app.UseAzureADBearerAuthentication(new AzureADAuthenticationOptions
{
Audience = "1234ab-5678",
AzureADInstance = "https://login.microsoftonline.com/", // or other instances
Tenant = "your-tenant.com"
});
in your Startup.cs
, in Configure
:
app.UseAuthentication();