I've created the .NET Core 2.1 web application. After, this app was integrated with Azure Active Directory (Microsoft.AspNetCore.Authentication.AzureAD
). There are a couple of tenants inside my active directory and in order to authenticate the user there is a need to provide AD tenant id, AD application client id.
Is there any way to use all tenants for authentication inside my Active Directory ?
public class Startup
{
// Generated code
public void ConfigureServices(IServiceCollection services)
{
services.AddAuthentication(AzureADDefaults.AuthenticationScheme)
.AddAzureAD(options =>
Configuration.Bind("AzureAd", options));
services.Configure<OpenIdConnectOptions>
(AzureADDefaults.OpenIdScheme, options =>
{
// OnTicketReceived, OnAuthenticationFailed, OnTokenValidated
})
}
// Generated code
}
This is my appsettings.json
file:
{
"AzureAd": {
"Instance": "https://login.microsoftonline.com",
"Domain": "some-domain.com",
"TenantId": "1a10b000-*******",
"ClientId": "15a0421d-*******",
"CallbackPath": "/signin-oidc"
}
}