你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Web Apps - Update Auth Settings Slot

汇报与 Web 应用关联的身份验证/授权设置的说明。

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings?api-version=2023-12-01

URI 参数

名称 必需 类型 说明
name
path True

string

Web 应用的名称。

resourceGroupName
path True

string

资源所属的资源组的名称。

Regex pattern: ^[-\w\._\(\)]+[^\.]$

slot
path True

string

Web 应用槽的名称。 如果未指定,则 默认为生产槽。

subscriptionId
path True

string

Azure 订阅 ID。 这是一个 GUID 格式的字符串, (例如 00000000-0000-0000-0000-0000000000000) 。

api-version
query True

string

API 版本

请求正文

名称 类型 说明
kind

string

资源类型。

properties.aadClaimsAuthorization

string

获取包含 Azure AD Acl 设置的 JSON 字符串。

properties.additionalLoginParams

string[]

用户登录时要发送到 OpenID Connect 授权终结点的登录参数。 每个参数必须采用“key=value”格式。

properties.allowedAudiences

string[]

验证 Azure Active Directory 颁发的 JSON Web 令牌时,允许考虑的受众值。 请注意,无论此设置如何, ClientID 值始终被视为允许的受众。

properties.allowedExternalRedirectUrls

string[]

可在登录或注销应用时重定向到的外部 URL。 请注意,将忽略 URL 的查询字符串部分。 这是一种高级设置,通常只有 Windows 应用商店应用程序后端才需要。 请注意,始终隐式允许当前域中的 URL。

properties.authFilePath

string

包含身份验证设置的配置文件的路径。 如果路径是相对路径,则 base 将用于站点的根目录。

properties.clientId

string

此信赖方应用程序的客户端 ID,称为 client_id。 此设置是使用 Azure Active Directory 或其他第三方 OpenID Connect 提供程序启用 OpenID 连接身份验证所必需的。 有关 OpenID Connect 的详细信息: http://openid.net/specs/openid-connect-core-1_0.html

properties.clientSecret

string

此信赖方应用程序的客户端密码在 Azure Active Directory 中 (,也称为密钥) 。 此设置是可选的。 如果未配置客户端密码,则 OpenID Connect 隐式身份验证流用于对最终用户进行身份验证。 否则,OpenID Connect 授权代码流用于对最终用户进行身份验证。 有关 OpenID Connect 的详细信息: http://openid.net/specs/openid-connect-core-1_0.html

properties.clientSecretCertificateThumbprint

string

客户端密码的替代方法,即用于签名的证书的指纹。 此属性充当客户端密码的替换。 这也是可选的。

properties.clientSecretSettingName

string

包含信赖方应用程序的客户端密码的应用设置名称。

properties.configVersion

string

当前应用使用的身份验证/授权功能的 ConfigVersion。 此值中的设置可以控制身份验证/授权的控制平面的行为。

properties.defaultProvider

BuiltInAuthenticationProvider

配置多个提供程序时要使用的默认身份验证提供程序。 仅当配置了多个提供程序并且未经身份验证的客户端操作设置为“RedirectToLoginPage”时,才需要此设置。

properties.enabled

boolean

true 如果为当前应用启用了身份验证/授权功能,则为 ;否则为 false

properties.facebookAppId

string

用于登录的Facebook应用的应用 ID。 启用登录Facebook需要此设置。 Facebook登录文档:https://developers.facebook.com/docs/facebook-login

properties.facebookAppSecret

string

用于Facebook登录的Facebook应用的应用机密。 启用登录Facebook需要此设置。 Facebook登录文档:https://developers.facebook.com/docs/facebook-login

properties.facebookAppSecretSettingName

string

包含用于登录Facebook的应用机密的应用设置名称。

properties.facebookOAuthScopes

string[]

将作为登录身份验证Facebook一部分请求的 OAuth 2.0 作用域。 此设置是可选的。 Facebook登录文档:https://developers.facebook.com/docs/facebook-login

properties.gitHubClientId

string

用于登录的 GitHub 应用的客户端 ID。 启用 Github 登录需要此设置

properties.gitHubClientSecret

string

用于 Github 登录的 GitHub 应用的客户端密码。 启用 Github 登录需要此设置。

properties.gitHubClientSecretSettingName

string

应用设置名称,其中包含用于 GitHub 登录的 Github 应用的客户端密码。

properties.gitHubOAuthScopes

string[]

将在 GitHub 登录身份验证过程中请求的 OAuth 2.0 范围。 此设置是可选的

properties.googleClientId

string

Google Web 应用程序的 OpenID Connect 客户端 ID。 启用 Google 登录需要此设置。 Google Sign-In 文档: https://developers.google.com/identity/sign-in/web/

properties.googleClientSecret

string

与 Google Web 应用程序关联的客户端密码。 启用 Google 登录需要此设置。 Google Sign-In 文档: https://developers.google.com/identity/sign-in/web/

properties.googleClientSecretSettingName

string

包含与 Google Web 应用程序关联的客户端密码的应用设置名称。

properties.googleOAuthScopes

string[]

将在 Google Sign-In 身份验证过程中请求的 OAuth 2.0 作用域。 此设置是可选的。 如果未指定,“openid”、“profile”和“email”将用作默认范围。 Google Sign-In 文档: https://developers.google.com/identity/sign-in/web/

properties.isAuthFromFile

string

如果应从文件读取身份验证配置设置,则为“true”,否则为“false”

properties.issuer

string

OpenID Connect 颁发者 URI,表示颁发此应用程序的访问令牌的实体。 使用 Azure Active Directory 时,此值是目录租户的 URI,例如 https://sts.windows.net/{tenant-guid}/。 此 URI 是令牌颁发者的区分大小写的标识符。 有关 OpenID Connect Discovery 的详细信息: http://openid.net/specs/openid-connect-discovery-1_0.html

properties.microsoftAccountClientId

string

为用于身份验证的应用创建的 OAuth 2.0 客户端 ID。 启用 Microsoft 帐户身份验证需要此设置。 Microsoft 帐户 OAuth 文档: https://dev.onedrive.com/auth/msa_oauth.htm

properties.microsoftAccountClientSecret

string

为用于身份验证的应用创建的 OAuth 2.0 客户端密码。 启用 Microsoft 帐户身份验证需要此设置。 Microsoft 帐户 OAuth 文档: https://dev.onedrive.com/auth/msa_oauth.htm

properties.microsoftAccountClientSecretSettingName

string

应用设置名称,其中包含为用于身份验证的应用创建的 OAuth 2.0 客户端密码。

properties.microsoftAccountOAuthScopes

string[]

将在 Microsoft 帐户身份验证过程中请求的 OAuth 2.0 范围。 此设置是可选的。 如果未指定,则使用“wl.basic”作为默认范围。 Microsoft 帐户范围和权限文档: https://msdn.microsoft.com/en-us/library/dn631845.aspx

properties.runtimeVersion

string

用于当前应用的身份验证/授权功能的 RuntimeVersion。 此值中的设置可以控制身份验证/授权模块中某些功能的行为。

properties.tokenRefreshExtensionHours

number

会话令牌过期后的小时数,会话令牌可用于调用令牌刷新 API。 默认值为 72 小时。

properties.tokenStoreEnabled

boolean

true 用于持久存储登录流期间获取的平台特定安全令牌;否则为 false。 默认为 false

properties.twitterConsumerKey

string

用于登录的 Twitter 应用程序的 OAuth 1.0a 使用者密钥。 启用 Twitter 登录需要此设置。 Twitter Sign-In 文档: https://dev.twitter.com/web/sign-in

properties.twitterConsumerSecret

string

用于登录的 Twitter 应用程序的 OAuth 1.0a 使用者机密。 启用 Twitter 登录需要此设置。 Twitter Sign-In 文档: https://dev.twitter.com/web/sign-in

properties.twitterConsumerSecretSettingName

string

包含用于登录的 Twitter 应用程序的 OAuth 1.0a 使用者机密的应用设置名称。

properties.unauthenticatedClientAction

UnauthenticatedClientAction

未经身份验证的客户端尝试访问应用时要执行的操作。

properties.validateIssuer

boolean

获取一个值,该值指示颁发者是否应是有效的 HTTPS URL 并对其进行验证。

响应

名称 类型 说明
200 OK

SiteAuthSettings

确定

Other Status Codes

DefaultErrorResponse

App 服务错误响应。

安全性

azure_auth

Azure Active Directory OAuth2 流

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名称 说明
user_impersonation 模拟用户帐户

定义

名称 说明
BuiltInAuthenticationProvider

配置多个提供程序时要使用的默认身份验证提供程序。 仅当配置了多个提供程序并且未经身份验证的客户端操作设置为“RedirectToLoginPage”时,才需要此设置。

DefaultErrorResponse

App 服务错误响应。

Details
Error

错误模型。

SiteAuthSettings

Azure 应用服务身份验证/授权功能的配置设置。

UnauthenticatedClientAction

未经身份验证的客户端尝试访问应用时要执行的操作。

BuiltInAuthenticationProvider

配置多个提供程序时要使用的默认身份验证提供程序。 仅当配置了多个提供程序并且未经身份验证的客户端操作设置为“RedirectToLoginPage”时,才需要此设置。

名称 类型 说明
AzureActiveDirectory

string

Facebook

string

Github

string

Google

string

MicrosoftAccount

string

Twitter

string

DefaultErrorResponse

App 服务错误响应。

名称 类型 说明
error

Error

错误模型。

Details

名称 类型 说明
code

string

用于以编程方式识别错误的标准化字符串。

message

string

详细的错误说明和调试信息。

target

string

详细的错误说明和调试信息。

Error

错误模型。

名称 类型 说明
code

string

用于以编程方式识别错误的标准化字符串。

details

Details[]

详细错误。

innererror

string

调试错误的详细信息。

message

string

详细的错误说明和调试信息。

target

string

详细的错误说明和调试信息。

SiteAuthSettings

Azure 应用服务身份验证/授权功能的配置设置。

名称 类型 说明
id

string

资源 ID。

kind

string

资源类型。

name

string

资源名称。

properties.aadClaimsAuthorization

string

获取包含 Azure AD Acl 设置的 JSON 字符串。

properties.additionalLoginParams

string[]

用户登录时要发送到 OpenID Connect 授权终结点的登录参数。 每个参数必须采用“key=value”格式。

properties.allowedAudiences

string[]

验证 Azure Active Directory 颁发的 JSON Web 令牌时,允许考虑的受众值。 请注意,无论此设置如何, ClientID 值始终被视为允许的受众。

properties.allowedExternalRedirectUrls

string[]

可在登录或注销应用时重定向到的外部 URL。 请注意,将忽略 URL 的查询字符串部分。 这是一种高级设置,通常只有 Windows 应用商店应用程序后端才需要。 请注意,始终隐式允许当前域中的 URL。

properties.authFilePath

string

包含身份验证设置的配置文件的路径。 如果路径是相对路径,则 base 将用于站点的根目录。

properties.clientId

string

此信赖方应用程序的客户端 ID,称为 client_id。 此设置是使用 Azure Active Directory 或其他第三方 OpenID Connect 提供程序启用 OpenID 连接身份验证所必需的。 有关 OpenID Connect 的详细信息: http://openid.net/specs/openid-connect-core-1_0.html

properties.clientSecret

string

此信赖方应用程序的客户端密码在 Azure Active Directory 中 (,也称为密钥) 。 此设置是可选的。 如果未配置客户端密码,则 OpenID Connect 隐式身份验证流用于对最终用户进行身份验证。 否则,OpenID Connect 授权代码流用于对最终用户进行身份验证。 有关 OpenID Connect 的详细信息: http://openid.net/specs/openid-connect-core-1_0.html

properties.clientSecretCertificateThumbprint

string

客户端密码的替代方法,即用于签名的证书的指纹。 此属性充当客户端密码的替换。 这也是可选的。

properties.clientSecretSettingName

string

包含信赖方应用程序的客户端密码的应用设置名称。

properties.configVersion

string

当前应用使用的身份验证/授权功能的 ConfigVersion。 此值中的设置可以控制身份验证/授权的控制平面的行为。

properties.defaultProvider

BuiltInAuthenticationProvider

配置多个提供程序时要使用的默认身份验证提供程序。 仅当配置了多个提供程序并且未经身份验证的客户端操作设置为“RedirectToLoginPage”时,才需要此设置。

properties.enabled

boolean

true 如果为当前应用启用了身份验证/授权功能,则为 ;否则为 false

properties.facebookAppId

string

用于登录的Facebook应用的应用 ID。 启用登录Facebook需要此设置。 Facebook登录文档:https://developers.facebook.com/docs/facebook-login

properties.facebookAppSecret

string

用于Facebook登录的Facebook应用的应用机密。 启用登录Facebook需要此设置。 Facebook登录文档:https://developers.facebook.com/docs/facebook-login

properties.facebookAppSecretSettingName

string

包含用于登录Facebook的应用机密的应用设置名称。

properties.facebookOAuthScopes

string[]

将作为登录身份验证Facebook一部分请求的 OAuth 2.0 作用域。 此设置是可选的。 Facebook登录文档:https://developers.facebook.com/docs/facebook-login

properties.gitHubClientId

string

用于登录的 GitHub 应用的客户端 ID。 启用 Github 登录需要此设置

properties.gitHubClientSecret

string

用于 Github 登录的 GitHub 应用的客户端密码。 启用 Github 登录需要此设置。

properties.gitHubClientSecretSettingName

string

应用设置名称,其中包含用于 GitHub 登录的 Github 应用的客户端密码。

properties.gitHubOAuthScopes

string[]

将在 GitHub 登录身份验证过程中请求的 OAuth 2.0 范围。 此设置是可选的

properties.googleClientId

string

Google Web 应用程序的 OpenID Connect 客户端 ID。 启用 Google 登录需要此设置。 Google Sign-In 文档: https://developers.google.com/identity/sign-in/web/

properties.googleClientSecret

string

与 Google Web 应用程序关联的客户端密码。 启用 Google 登录需要此设置。 Google Sign-In 文档: https://developers.google.com/identity/sign-in/web/

properties.googleClientSecretSettingName

string

包含与 Google Web 应用程序关联的客户端密码的应用设置名称。

properties.googleOAuthScopes

string[]

将在 Google Sign-In 身份验证过程中请求的 OAuth 2.0 作用域。 此设置是可选的。 如果未指定,“openid”、“profile”和“email”将用作默认范围。 Google Sign-In 文档: https://developers.google.com/identity/sign-in/web/

properties.isAuthFromFile

string

如果应从文件读取身份验证配置设置,则为“true”,否则为“false”

properties.issuer

string

OpenID Connect 颁发者 URI,表示颁发此应用程序的访问令牌的实体。 使用 Azure Active Directory 时,此值是目录租户的 URI,例如 https://sts.windows.net/{tenant-guid}/。 此 URI 是令牌颁发者的区分大小写的标识符。 有关 OpenID Connect Discovery 的详细信息: http://openid.net/specs/openid-connect-discovery-1_0.html

properties.microsoftAccountClientId

string

为用于身份验证的应用创建的 OAuth 2.0 客户端 ID。 启用 Microsoft 帐户身份验证需要此设置。 Microsoft 帐户 OAuth 文档: https://dev.onedrive.com/auth/msa_oauth.htm

properties.microsoftAccountClientSecret

string

为用于身份验证的应用创建的 OAuth 2.0 客户端密码。 启用 Microsoft 帐户身份验证需要此设置。 Microsoft 帐户 OAuth 文档: https://dev.onedrive.com/auth/msa_oauth.htm

properties.microsoftAccountClientSecretSettingName

string

应用设置名称,其中包含为用于身份验证的应用创建的 OAuth 2.0 客户端密码。

properties.microsoftAccountOAuthScopes

string[]

将在 Microsoft 帐户身份验证过程中请求的 OAuth 2.0 范围。 此设置是可选的。 如果未指定,则使用“wl.basic”作为默认范围。 Microsoft 帐户范围和权限文档: https://msdn.microsoft.com/en-us/library/dn631845.aspx

properties.runtimeVersion

string

用于当前应用的身份验证/授权功能的 RuntimeVersion。 此值中的设置可以控制身份验证/授权模块中某些功能的行为。

properties.tokenRefreshExtensionHours

number

会话令牌过期后的小时数,会话令牌可用于调用令牌刷新 API。 默认值为 72 小时。

properties.tokenStoreEnabled

boolean

true 用于持久存储登录流期间获取的平台特定安全令牌;否则为 false。 默认为 false

properties.twitterConsumerKey

string

用于登录的 Twitter 应用程序的 OAuth 1.0a 使用者密钥。 启用 Twitter 登录需要此设置。 Twitter Sign-In 文档: https://dev.twitter.com/web/sign-in

properties.twitterConsumerSecret

string

用于登录的 Twitter 应用程序的 OAuth 1.0a 使用者机密。 启用 Twitter 登录需要此设置。 Twitter Sign-In 文档: https://dev.twitter.com/web/sign-in

properties.twitterConsumerSecretSettingName

string

包含用于登录的 Twitter 应用程序的 OAuth 1.0a 使用者机密的应用设置名称。

properties.unauthenticatedClientAction

UnauthenticatedClientAction

未经身份验证的客户端尝试访问应用时要执行的操作。

properties.validateIssuer

boolean

获取一个值,该值指示颁发者是否应是有效的 HTTPS URL 并对其进行验证。

type

string

资源类型。

UnauthenticatedClientAction

未经身份验证的客户端尝试访问应用时要执行的操作。

名称 类型 说明
AllowAnonymous

string

RedirectToLoginPage

string