How to Authenticate from Azure

First you need to create a section in appsettings.json file
  "AzureAd": {
    "Instance": "https://login.microsoftonline.com/",
    "Domain": "Your Domain",
    "TenantId": "Your Tenant Id",
    "ClientId": "Your Client Id",
    "CallbackPath": "/signin-oidc"
  }
then I usually use extension method for the service collection
public static void AddApplicationAuthentication(this IServiceCollection services)
        {
            IConfiguration Configuration = services.BuildServiceProvider().GetRequiredService<IConfiguration>();

            services.Configure<CookiePolicyOptions>(options =>
            {
                // This lambda determines whether user consent for non-essential cookies is needed for a given request.
                options.CheckConsentNeeded = context => true;
                options.MinimumSameSitePolicy = SameSiteMode.None;
            });

            services.AddAuthentication(AzureADDefaults.AuthenticationScheme)
                .AddAzureAD(options => Configuration.Bind("AzureAd", options));
        }
this should do the trick

filter attribute that checks whether current connection is secured

using APS.net Core to mark all website pages working with https protocol we will do this using IAuthorizationFilter. and here is an exampl...