Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Lync / UCWA be used to set the presence-information for an other user on the Lync platform?

We have a telephony platform, and we are looking to change the presence status of Lync users, based on events in the telephony platform. We would prefer to use the UCWA REST api, as we are familiar with REST api's and have most of the infrastructure in place already.

Checking the documentation, it quickly becomes apparent that a user can set its own presence. However, we don't want to keep track of the authentication information for every single user. Instead, can some users (presumably an administrator-like user) alter the presence status of other users using UCWA? Any other practical possibilities for managing the presence-status of Lync users externally?

like image 553
TinkerTank Avatar asked May 29 '14 12:05

TinkerTank


2 Answers

Via an answer I provided on the MSDN Forums: Can UCWA be used to set the presence-information for an other user on the Lync platform?

Simple Answer:

This is not possible in UCWA as the logged in user (endpoint) does not have privileges to take those type of actions.

Is it possible another way Answer:

You could make use of UCMA and create a Trusted Application which would allow creation of a UserEndpoint which would not need to know the user's credentials to make changes to their presence data. You would need to wrap this logic into a Web API and connect it to your specific application/scenario.

like image 139
ShelbyZ Avatar answered Sep 29 '22 10:09

ShelbyZ


As ShelbyZ already wrote, the only proper way to publish presence for a user you do not have login details for is by creating a Trusted Application.

A trusted application is an application based on Microsoft Unified Communications Managed API (UCMA) Core SDK that is trusted by Microsoft Lync Server.

  • Trusted applications are not challenged for authentication by Lync Server 2010.
  • Trusted applications are not throttled by Lync Server 2010 for SIP transactions, connections or outgoing Voice over Internet Protocol (VoIP) calls.
  • Trusted applications can impersonate any user and can join conferences without appearing in rosters.
  • Trusted applications are highly available and resilient.

A trusted application is allowed to impersonate users and create endpoints on their behalf without requiring authentication. You can then use these user endpoints to publish presence for others.

There is a second solution, but I would advise against it. It is not the correct way to handle this problem:

You can look in the .\rtclocal database on your frontend server. Look at rtc.dbo.PublishedCategoryInstanceView, it contains XML data with presence containers for all users homed on that frontend server. You could edit the XML data and change the presence that way... but please be smart and use the UCMA Trusted Application instead.

like image 27
Willem Avatar answered Sep 29 '22 09:09

Willem