无法通过统一通信 API 连接到 Office Communications Server

发布于 2024-08-15 18:56:59 字数 802 浏览 10 评论 0原文

我正在尝试使用统一通信托管 API 连接到 Office Communications Server。我已经尝试过为 OCS 启用我的用户和新用户。两个帐户都可以成功登录 Office Communicator 客户端,但无法使用 API。创建网络凭据时,如果我以域\用户名的形式传入用户名,则会收到此错误:

SupportedAuthenticationProtocols=Ntlm, Kerberos
Realm=SIP Communications Service
FailureReason=InvalidCredentials
ErrorCode=-2146893044
Microsoft.Rtc.Signaling.AuthenticationException: The log on was denied. Check that the proper credentials are being used and the account is active. ---> Microsoft.Rtc.Internal.Sip.AuthException: NegotiateSecurityAssociation failed, error: - 2146893044

如果我在用户名中省略域,则会出现此错误:

ResponseCode=404 ResponseText=Not Found
DiagnosticInformation=ErrorCode=4005,Source=OCS.mydomain.com,Reason=Destination URI either not enabled for SIP or does not exist

I am trying to connect to Office Communication Server using the Unified Communications Managed API. I have tried my user and a fresh user enabled for OCS. Both account can successfully log into the Office Communicator client, but fail using the API. When creating the network credential, if I pass in the username in the form domain\username, I get this error:

SupportedAuthenticationProtocols=Ntlm, Kerberos
Realm=SIP Communications Service
FailureReason=InvalidCredentials
ErrorCode=-2146893044
Microsoft.Rtc.Signaling.AuthenticationException: The log on was denied. Check that the proper credentials are being used and the account is active. ---> Microsoft.Rtc.Internal.Sip.AuthException: NegotiateSecurityAssociation failed, error: - 2146893044

If I leave off the domain in the username I this error:

ResponseCode=404 ResponseText=Not Found
DiagnosticInformation=ErrorCode=4005,Source=OCS.mydomain.com,Reason=Destination URI either not enabled for SIP or does not exist

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

吃素的狼 2024-08-22 18:56:59

事实证明这是我的疏忽。我们的AD域和通讯器域是不同的,我以为它们是相同的。

网络凭据为域\用户名,sip 地址应为 sip:[email protected] ],我使用的是 sip:[电子邮件受保护]

Turns out this was an oversight on my part. Our AD domain and communicator domain are different, I had assumed they were the same.

The network credential is domain\username, and the sip address should have been sip:[email protected], I was using sip:[email protected].

那片花海 2024-08-22 18:56:59

需要注意两点:

  1. 用户名不应包含域。您应该使用 NetworkCredential 的单独 Domain 属性。
  2. 您还需要传入用户 URI - 例如:

//Initialize and register the endpoint, using the credentials of the user the application will be acting as.
        UserEndpointSettings userEndpointSettings = new UserEndpointSettings(_userURI, _userServer);
        userEndpointSettings.Credential = _credential;
        _userEndpoint = new UserEndpoint(_collabPlatform, userEndpointSettings);
        _userEndpoint.BeginEstablish(EndEndpointEstablish, _userEndpoint);

Two things to note:

  1. Username should not contain the domain. There should be a separate Domain property of NetworkCredential that you should be using.
  2. You also need to pass in the user URI as well - for example:

//Initialize and register the endpoint, using the credentials of the user the application will be acting as.
        UserEndpointSettings userEndpointSettings = new UserEndpointSettings(_userURI, _userServer);
        userEndpointSettings.Credential = _credential;
        _userEndpoint = new UserEndpoint(_collabPlatform, userEndpointSettings);
        _userEndpoint.BeginEstablish(EndEndpointEstablish, _userEndpoint);

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文