【问题标题】:How to connect to Exchange online in Azure function如何在 Azure 功能中在线连接到 Exchange
【发布时间】:2022-01-01 19:28:59
【问题描述】:

我尝试通过 CertificateThumbprint 以 Azure 功能在线连接到 Exchange,但总是出错

“未找到证书”

我可以连接本地,但是当我部署到 azure 功能时,我无法连接 我用:

 Connect-ExchangeOnline -AppId <%App_id%> -CertificateThumbprint <%Thumbprint string of certificate%> -Organization "contoso.onmicrosoft.com"

谁能给我推荐一下

【问题讨论】:

  • 您是否已将证书上传到 ttl 设置并创建了该特定证书的应用程序设置“WEBSITE_LOAD_CERTIFICATE= thumbprint”?
  • 是的,我做到了,但我遇到了同样的错误。
  • 您是否尝试在代码中调用该应用程序设置$env:WEBSITE_LOAD_CERRTIFICATE
  • 不,我没有,所以我会尝试感谢您的回复
  • 我试过但还是不行

标签: powershell azure-functions exchange-server


【解决方案1】:
Connect-ExchangeOnline -AppId <%App_id%> -CertificateThumbprint <%Thumbprint string of certificate%> -Organization "contoso.onmicrosoft.com"

此 cmdlet 在无人参与的脚本方案中使用证书指纹连接到 Exchange Online。

从这个Microsoft documentation,我了解到:

不要在 cmdlet 中传递 Thumbprint string value of certificate,而是将指纹移动到应用程序设置并使用 $env:CERT_THUMBPRINT 从脚本中检索它。

请参考此SO Thread 1SO Thread 2,其中通过门户上传证书以及在应用设置中定义证书字符串值等几个步骤来解决在线连接交换和其他天蓝色功能时找不到证书的问题。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-03-02
    • 2016-07-14
    • 2021-09-14
    • 2022-08-06
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多