我部署了一个 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/