tags:

views:

502

answers:

4

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
A: 
adeel825
Thanks for the response, I am doing both of those things; however, I am using the CollaborationPlatform not the UserEndpoint. The error I am getting is from a sample included with the UCMA called Basic IM Call.
Robin Clowers
+1  A: 

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].

Robin Clowers
A: 

I am getting error NegotiateSecurityAssociation failed, error: -2146893039, not sure I am getting this?

I have enable TLS between host of UCMA app and OCS server. but UCMA app is in different domain? does it matter? if I call the same method and same credentail from server itself, it just work fine.. any help in this area will be helpful.

thanks Manish

manish
I'm really not sure how spanning domains would affect UCMA, I think it should work, but I have never tried it.
Robin Clowers
A: 

Hello, this is exactly I am doing what you describe in fact I picked the code from samples. this code is working if I try to setup connection from Server itself. but i think coz my client machine is in different domain that why its causing the issue.

any other suggestion. thanks manish

        //Initalize 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 userEndpoint = new UserEndpoint(collabPlatform, userEndpointSettings);
        userEndpoint.BeginEstablish(EndEndpointEstablish, userEndpoint);
manish