azure - 使用 Azure Functions 连接到 AzureAD 时出现 TLS 版本问题

标签 azure powershell azure-active-directory azure-functions azure-ad-powershell-v2

我部署了一个 Azure 函数应用程序,在其中一个函数中使用命令 Connect-AzureAD 时抛出错误“您正在使用 TLS 版本 1.0、1.1 和/或 3DES 密码,这些密码已被弃用,以改善Azure AD”

虽然功能App

  • 最低 tls 版本为 1.2
  • .NET 框架是 4.8.x
  • 与此相关的其他服务,例如存储帐户等 函数应用使用的最低 TLS 版本为 1.2。

功能应用详细信息

函数运行时:Powershell

运行时版本:3.8.2.0

有关此问题的任何帮助都会有所帮助

最佳答案

也遇到了这个错误,奇怪的是当运行命令 [Net.ServicePointManager]::SecurityProtocol 时看起来我正在使用 Tls12 .

错误:

Error Acquiring Token: AADSTS1002016: You are using TLS version 1.0, 1.1 and/or 3DES cipher which are deprecated to improve the security postur e of Azure AD. Your TenantID is: 00000000-0000-0000-0000-000000000000. Please refer to https://go.microsoft.com/fwlink/?linkid=2161187 and conduct needed actions to remediate the issue. For further questions, please contact your administrator

首先将 TLS 设置为 1.3,如下所示:

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls13

这在尝试连接时给了我一个异常(exception)。

然后我使用下面的命令将其设置回 Tls12然后一切正常:

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

关于azure - 使用 Azure Functions 连接到 AzureAD 时出现 TLS 版本问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73132536/

相关文章:

azure - 限制 Azure AD 用户访问 Web api Controller

azure - 对于门户上的 Java 8 + JBOSS EAP 7,p0v3 应用程序服务计划选项不显示

Powershell 格式表转 CSV

dotnet core 2 API 和守护程序应用程序中的 Azure AD 身份验证

适用于 AWS 的 PowerShell : List only "folders" from S3 bucket?

powershell - Powershell连接到Exchange Server失败

java - 如何使用 Java 下载/上传 Azure B2C TrustFrameworkPolicy

azure - 循环逻辑应用程序事件 ARM 模板自动化

azure - CORS 预检请求不适用于 Azure API 管理

azure - Cloud Explorer 相当于调试 VS2022 用于上传到存储的压缩发布代码?