MicrosoftIdentityWebAppAuthenticationBuilderExtensions.AddMicrosoftIdentityWebApp Method

Definition

Overloads

AddMicrosoftIdentityWebApp(AuthenticationBuilder, IConfigurationSection, String, String, Boolean)

Add authentication with Microsoft identity platform. This method expects the configuration file will have a section, named "AzureAd" as default, with the necessary settings to initialize authentication options.

AddMicrosoftIdentityWebApp(AuthenticationBuilder, IConfiguration, String, String, String, Boolean)

Add authentication to a web app with Microsoft identity platform. This method expects the configuration file will have a section, named "AzureAd" as default, with the necessary settings to initialize authentication options.

AddMicrosoftIdentityWebApp(AuthenticationBuilder, Action<MicrosoftIdentityOptions>, Action<CookieAuthenticationOptions>, String, String, Boolean)

Add authentication with Microsoft identity platform.

AddMicrosoftIdentityWebApp(AuthenticationBuilder, IConfigurationSection, String, String, Boolean)

Add authentication with Microsoft identity platform. This method expects the configuration file will have a section, named "AzureAd" as default, with the necessary settings to initialize authentication options.

public static Microsoft.Identity.Web.MicrosoftIdentityWebAppAuthenticationBuilderWithConfiguration AddMicrosoftIdentityWebApp (this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder, Microsoft.Extensions.Configuration.IConfigurationSection configurationSection, string openIdConnectScheme = "OpenIdConnect", string? cookieScheme = "Cookies", bool subscribeToOpenIdConnectMiddlewareDiagnosticsEvents = false);
static member AddMicrosoftIdentityWebApp : Microsoft.AspNetCore.Authentication.AuthenticationBuilder * Microsoft.Extensions.Configuration.IConfigurationSection * string * string * bool -> Microsoft.Identity.Web.MicrosoftIdentityWebAppAuthenticationBuilderWithConfiguration
<Extension()>
Public Function AddMicrosoftIdentityWebApp (builder As AuthenticationBuilder, configurationSection As IConfigurationSection, Optional openIdConnectScheme As String = "OpenIdConnect", Optional cookieScheme As String = "Cookies", Optional subscribeToOpenIdConnectMiddlewareDiagnosticsEvents As Boolean = false) As MicrosoftIdentityWebAppAuthenticationBuilderWithConfiguration

Parameters

builder
Microsoft.AspNetCore.Authentication.AuthenticationBuilder

The Microsoft.AspNetCore.Authentication.AuthenticationBuilder to which to add this configuration.

configurationSection
Microsoft.Extensions.Configuration.IConfigurationSection

The configuration section from which to get the options.

openIdConnectScheme
System.String

The OpenID Connect scheme name to be used. By default it uses "OpenIdConnect".

cookieScheme
System.String

The cookie-based scheme name to be used. By default it uses "Cookies".

subscribeToOpenIdConnectMiddlewareDiagnosticsEvents
System.Boolean

Set to true if you want to debug, or just understand the OpenID Connect events.

Returns

MicrosoftIdentityWebAppAuthenticationBuilderWithConfiguration

The authentication builder for chaining.

Applies to

AddMicrosoftIdentityWebApp(AuthenticationBuilder, IConfiguration, String, String, String, Boolean)

Add authentication to a web app with Microsoft identity platform. This method expects the configuration file will have a section, named "AzureAd" as default, with the necessary settings to initialize authentication options.

public static Microsoft.Identity.Web.MicrosoftIdentityWebAppAuthenticationBuilderWithConfiguration AddMicrosoftIdentityWebApp (this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder, Microsoft.Extensions.Configuration.IConfiguration configuration, string configSectionName = "AzureAd", string openIdConnectScheme = "OpenIdConnect", string? cookieScheme = "Cookies", bool subscribeToOpenIdConnectMiddlewareDiagnosticsEvents = false);
static member AddMicrosoftIdentityWebApp : Microsoft.AspNetCore.Authentication.AuthenticationBuilder * Microsoft.Extensions.Configuration.IConfiguration * string * string * string * bool -> Microsoft.Identity.Web.MicrosoftIdentityWebAppAuthenticationBuilderWithConfiguration
<Extension()>
Public Function AddMicrosoftIdentityWebApp (builder As AuthenticationBuilder, configuration As IConfiguration, Optional configSectionName As String = "AzureAd", Optional openIdConnectScheme As String = "OpenIdConnect", Optional cookieScheme As String = "Cookies", Optional subscribeToOpenIdConnectMiddlewareDiagnosticsEvents As Boolean = false) As MicrosoftIdentityWebAppAuthenticationBuilderWithConfiguration

Parameters

builder
Microsoft.AspNetCore.Authentication.AuthenticationBuilder

The Microsoft.AspNetCore.Authentication.AuthenticationBuilder to which to add this configuration.

configuration
Microsoft.Extensions.Configuration.IConfiguration

The configuration instance.

configSectionName
System.String

The configuration section with the necessary settings to initialize authentication options.

openIdConnectScheme
System.String

The OpenID Connect scheme name to be used. By default it uses "OpenIdConnect".

cookieScheme
System.String

The cookie-based scheme name to be used. By default it uses "Cookies".

subscribeToOpenIdConnectMiddlewareDiagnosticsEvents
System.Boolean

Set to true if you want to debug, or just understand the OpenID Connect events.

Returns

MicrosoftIdentityWebAppAuthenticationBuilderWithConfiguration

The MicrosoftIdentityWebAppAuthenticationBuilderWithConfiguration builder for chaining.

Applies to

AddMicrosoftIdentityWebApp(AuthenticationBuilder, Action<MicrosoftIdentityOptions>, Action<CookieAuthenticationOptions>, String, String, Boolean)

Add authentication with Microsoft identity platform.

public static Microsoft.Identity.Web.MicrosoftIdentityWebAppAuthenticationBuilder AddMicrosoftIdentityWebApp (this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder, Action<Microsoft.Identity.Web.MicrosoftIdentityOptions> configureMicrosoftIdentityOptions, Action<Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions>? configureCookieAuthenticationOptions = default, string openIdConnectScheme = "OpenIdConnect", string? cookieScheme = "Cookies", bool subscribeToOpenIdConnectMiddlewareDiagnosticsEvents = false);
static member AddMicrosoftIdentityWebApp : Microsoft.AspNetCore.Authentication.AuthenticationBuilder * Action<Microsoft.Identity.Web.MicrosoftIdentityOptions> * Action<Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions> * string * string * bool -> Microsoft.Identity.Web.MicrosoftIdentityWebAppAuthenticationBuilder
<Extension()>
Public Function AddMicrosoftIdentityWebApp (builder As AuthenticationBuilder, configureMicrosoftIdentityOptions As Action(Of MicrosoftIdentityOptions), Optional configureCookieAuthenticationOptions As Action(Of CookieAuthenticationOptions) = Nothing, Optional openIdConnectScheme As String = "OpenIdConnect", Optional cookieScheme As String = "Cookies", Optional subscribeToOpenIdConnectMiddlewareDiagnosticsEvents As Boolean = false) As MicrosoftIdentityWebAppAuthenticationBuilder

Parameters

builder
Microsoft.AspNetCore.Authentication.AuthenticationBuilder

The Microsoft.AspNetCore.Authentication.AuthenticationBuilder to which to add this configuration.

configureMicrosoftIdentityOptions
System.Action<MicrosoftIdentityOptions>

The action to configure MicrosoftIdentityOptions.

configureCookieAuthenticationOptions
System.Action<Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions>

The action to configure Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions.

openIdConnectScheme
System.String

The OpenID Connect scheme name to be used. By default it uses "OpenIdConnect".

cookieScheme
System.String

The cookie-based scheme name to be used. By default it uses "Cookies".

subscribeToOpenIdConnectMiddlewareDiagnosticsEvents
System.Boolean

Set to true if you want to debug, or just understand the OpenID Connect events.

Returns

MicrosoftIdentityWebAppAuthenticationBuilder

The authentication builder for chaining.

Applies to