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

DeviceCodeCredentialOptions.DisableAutomaticAuthentication 属性

定义

防止 DeviceCodeCredential 自动提示用户。 如果禁用自动身份验证,则会在需要用户交互的情况下从 GetToken(TokenRequestContext, CancellationToken)GetTokenAsync(TokenRequestContext, CancellationToken) 引发 AuthenticationRequiredException。 应用程序负责处理此异常,并调用 Authenticate(CancellationToken)AuthenticateAsync(CancellationToken) 以交互方式对用户进行身份验证。

public bool DisableAutomaticAuthentication { get; set; }
member this.DisableAutomaticAuthentication : bool with get, set
Public Property DisableAutomaticAuthentication As Boolean

属性值

适用于