Office Communicator has supported the customization of up to 4 additional presence states for some times, and there are many articles all over the Internet on this topic. But I have not yet seen one specifically for Lync, so here is a brief overview.
Basically the same configuration steps are used as what Office Communicator 2007 R2 required, since a change to the default security behavior was added after the 2007 (R1) client which prevented the use of non HTTPS connections to the configuration file.
- Create a new XML file on the local workstation and customize the presence states and descriptions.
- Disable SIP High Security Mode within Lync.
- Enable Custom Presence States within Lync.
This article has been updated (September 2012) to include an additional set of instructions describing a more secure configuration approach meant for production deployments. The original basic configuration was intended for one-off usage or testing, while the newer more secure method is considered best practice for production deployments.
This article has been updated yet again (October 2012) to include the new registry path that the Lync 2013 client uses as now it is part of the Office 2013 suite. See the end of this article for the changes specific to Lync 2013.
Basic Configuration
So if you already know how to do this in the OCS R2 client, then follow the same steps. For those of you new to the Communications Server products then here is a step-by-step walkthrough specifically for Lync.
Configure Presence File
The custom configuration information is stored in an XML file that must be manually created first. Unique entries can be created with a few limitations: a maximum of 4 states and a limit of 64 characters in the description text. This file can be accessed by the Lync client using either direct access to the file (via local disk or shared directory on a remote server) or as a web client using HTTP or HTTPS.
The aforementioned change between OC 2007 and 2007 R2 is the default behavior is now to force a secure connection to the XML file, limiting the option to only accessing the file via HTTPS. This is fine when you want the same custom states to be available for multiple users across all workstations, but for simply adding the additional states to a single primary workstation for yourself using a local file is the best approach.
Because Lync follows the same default behavior of forcing HTTPS then in order to use a local XML file this behavior will need to be disabled, which will be addressed in the next section. For now the following steps should be performed to create the configuration file and store it on the local workstation.
- Copy the following text and save into a new text file named presence.xml saved somewhere on the local workstation. (e.g. c:\Windows\presence.xml). (This file can be saved anywhere as long as file security settings allow read access to it. Commonly it can be stored in either the client installation directory or user’s documents folder. I simply prefer to drop stuff in the system directory and the path is simple and does not include spaces which often require encapsulating paths within quotes.)
<?xml version="1.0"?> <customStates xmlns="http://schemas.microsoft.com/09/2009/communicator/customStates"> <customState ID="1" availability="Busy">
<activity LCID="1033">Urgent Interruptions Only</activity>
</customState>
<customState ID="2" availability="Busy">
<activity LCID="1033">Customer Demo</activity>
</customState>
<customState ID="3" availability="Busy">
<activity LCID="1033">In a Video Call</activity>
</customState>
<customState ID="4" availability="Busy">
<activity LCID="1033">In Training Session</activity>
</customState>
</customStates>
- Within the presence.xml file edit the availability values and description text to customize each of the 4 custom states to the desired information. The availability values are limited to the following strings: Online, Busy, and Do-Not-Disturb. The activity string text is limited to a maximum of 64 characters.
Configure Registry
To trigger the Lync client to import and use the custom state information two settings will need to be set within the local workstation’s registry. The first is to allow a local file to be read and removed the HTTPS requirement while the second settings tell Lync where to find the presence configuration file.
- Create a new REG_DWORD value named EnableSIPHighSecurityMode in the Communicator Software Policies key shown below. Enter the value of ‘0’ to disable this security mode.
Path: HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Communicator
Name: EnableSIPHighSecurityMode
Value: 0
- Create a new REG_SZ value named CustomStateURL in the same key as shown below. Enter the absolute path to the presence.xml file using the file:/// URL format.
Path: HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Communicator
Name: CustomStateURL
Value: file:///C:/Windows/presence.xml
- Exit and restart the Lync client to pick up the configuration changes and then pull down the status menu to locate the new choices.
Recommended Configuration
As previously mentioned the outlined process is more for testing or demonstration purposes as it requires lowering the SIP security setting on the client to support unencrypted connections to the customer presence definition file. In order to retain the default behavior in Lync but still utilize this feature then the custom XML file must be stored on a web server with HTTPS enabled.
Additionally editing registry setting on individual computers is not scalable so normally Group Policy would be used to handle this. But Lync Server 2010 contains a client policy setting to provide the path of the custom presence file to the client via in-band provisioning.
Thus the recommend approach for configuring this additional functionality in a production environment would be to use an HTTPS server to retain the default security behavior as well as utilizing the in-band policies. No direct modification of the registry is required for this scenario.
Configure Presence File
- Using the same guidance as provided earlier create a custom presence XML file (e.g. presence.xml). A slightly different configuration is used below to show another example with different presence states.
<?xml version="1.0"?>
<customStates xmlns="http://schemas.microsoft.com/09/2009/communicator/customStates">
<customState ID="1" availability="Busy">
<activity LCID="1033">Urgent Interruptions Only</activity>
</customState>
<customState ID="2" availability="Online">
<activity LCID="1033">Customer Demonstration</activity>
</customState>
<customState ID="3" availability="Busy">
<activity LCID="1033">Customer Demonstration</activity>
</customState>
<customState ID="4" availability="Do-Not-Disturb">
<activity LCID="1033">Customer Presentation</activity>
</customState>
</customStates>
The next step is to save the file on a web server which support HTTPS client connections. It is important to place the file on a server that both internal and external Lync client can resolve and connect to as Lync does not use separate parameters for internal or external customer presence URLs. In a typical Lync Server deployment with external access and a reverse proxy server the simplest solution may be to locate the custom presence file on one of the published web sites where both external clients and internal clients can reach it. This solution would require that internal Lync clients are still able to resolve the external web services FQDN correct and then connect to the service by hairpinning out of the network and back into the reverse proxy. Other alternative may be used to provide access to this file for all clients in a specific deployment, so this approach is just one way to do so; it is not the only method. Also by placing the file on a Lync Server that the clients already have access to the issues for trusted certificates for HTTPS and any authentication required to access the data are already addressed.
- Save the presence.xml file in the External Website folder of the desired Lync Front End or Director server. This is the default root directory for the external web services on a Lync Front End server.
C:\Program Files\Microsoft Lync Server 2010\Web Components\External Website\
- Test secure access to the file from a web browser by using the external web services FQDN for the published web service and adding the presence file name and extension to the end of the path.
https://lyncweb.mslync.net/presence.xml
Configure Policy
The final step is to configure the client policy parameter in Lync server so that all Lync clients will be provided the path to the centrally located presence configuration file. There are two approaches to enabling this: either by configuring the default global client policy which will apply the changes to users or by creating a new client policy and granting that policy to only the specific set of Lync users which should receive this capability. Using multiple client policies also provides the flexibility to assign different sets of users to different presence configuration files in the event that not all users should have the same file.
Another advantage of this approach is that this client policy parameter could be used to point to an invalid path to prevent users from enabling their own custom presence settings. By design if the Lync client is provided a configuration setting by both an in-band policy as well as a local registry setting for the same parameter then Lync will adhere to the in-band policy and ignore the registry setting. Thus to prevent users from configuring their own local custom files an administrator can define a defunct policy in Lync which will always override any local settings, effectively locking out changes applied at the workstation level.
These directions will simply cover the basic steps of enabling this parameter on the default Global policy which will apply to all Lync users.
- Using the Lync Server Management Shell issue the following Set-CsClientPolicy cmdlet to enable and define the CustomStateURL in the default Global client policy.
Set-CsClientPolicy -Identity Global -CustomStateUrl "https://lyncweb.mslync.net/presence.xml”
- Issue the following Get-CsClientPolicy cmdlet to verify the CustomStateUrl parameter has been correctly defined on the desired client policy.
Get-CsClientPolicy -Identity Global | Select-Object Custom* | fl
- Exit and restart the Lync client to pick up the configuration changes and then pull down the status menu to locate the new choices.
Lync 2013 Configuration
For the Lync 2013 Windows client there has been one change that impacts this configuration. As the Lync client is now part of the Office 2013 suite then all of the registry settings are now stored in a completely different location. So for client-side file hosting or configuration the following alterations are required to the instructions provided above. If using the server-side policy configuration then there is no difference as the 2013 client will work the same way with the in-band policy settings.
Configure Presence File
Follow the same exact steps as shown earlier in the article to create the custom presence file and store it the desired location.
Configure Registry
If no policies have yet been defined then the following key hierarchy may need to be created manually in the workstation’s registry. (Note that either the LOCAL_MACHINE or LOCAL_USER hive can use used for this configuration if desired.)
- Open the Registry Editor and then browse to the HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft key.
- Create a new key named Office under the Microsoft key. In the Office key create a new key named 15.0. In the 15.0 key create a new key called Lync. The resulting key structure should look like the following screenshot.
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Office\15.0\Lync
- Create a new REG_DWORD value named EnableSIPHighSecurityMode in the Lync Software Policies key shown below. Enter the value of ‘0’ to disable this security mode.
Path: HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Office\15.0\Lync
Name: EnableSIPHighSecurityMode
Value: 0
- Create a new REG_SZ value named CustomStateURL in the same key as shown below. Enter the absolute path to the presence.xml file using the file:/// URL format.
Path: HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Office\15.0\Lync
Name: CustomStateURL
Value: file:///C:/Windows/presence.xml
- Exit and restart the Lync client to pick up the configuration changes and then pull down the status menu to locate the new choices.
[…] This post was mentioned on Twitter by Tom Pacyk, Adam Jacobs. Adam Jacobs said: Jeff Schertz's Blog – Adding Custom Presence to Lync http://bit.ly/bgsBBm […]
[…] Adding Custom Presence to Lync « Jeff Schertz’s Blog Posted on November 8, 2010 by johnacook http://blog.schertz.name/2010/11/adding-custom-presence-to-lync/ […]
Cant seem to make customer presence work when setting availability to anything but "busy"
Mitch, I just fixed the article as I had a typo in it. Try using the strings "Online" (for Available) and "Do-Not-Disturb".
[…] Custom Presence State: http://blog.schertz.name/2010/11/adding-custom-presence-to-lync/ […]
Why am I not surprised to find the first hit for my Lync questions to be your blog?! Thanks for the info – this worked like a charm. Hope you are well!
Hi Jeff
First thx for a great post.
According to http://technet.microsoft.com/en-us/library/gg3989…
MS do not mension any need to add reg values. If I follow you post I get it to work but not when following MS
Is it a bug or have MS forgot something you think?
The note at the bottom of that TechNet page explains that the Client-based policies take precedence over the Registry-based local policy setting I have originally documented. But that article does not mention the 'EnableSIPHighSecurityMode' which if not configured typically prevents the custom states from being available.
worked for me… thank you …
You rock Jeff…. It worked just fine. Thanks
Great post!
I found there are also a couple of free tools on the internet that do these entries for you.
Search for "custom states lync" with a search engine of your choice.
It seems like I don’t have an entry “Communicator” in the registry. I can find “communicator” under software/microsoft/communicator; but not under policies/microsoft/.
Any idea why it’s missing?
If there are currently no policies defined then the Communicator key under Policies will not exist, you need to manually create it first.
works!!! Thanks Jeff!
Yet another fix/enhancement for Lync that I found on your blog which is like the default go-to place for these issues! When is Microsoft going to incorporate your body of work in the product?
Hi Jeff,
I have followed your descirption and found some problem – after client restart I see those 4 new status but all of them are named as "availability" not as "activity", so I have 4 red squars for status and all of them named BUSY – why?
My example configuration file has all 4 values set to Busy, but you can change the Activity text string to whatever you want and change the Availbility parameter to either 'Online' or 'Do-Not-Disturb' as well.
what about the "Away" Status, can this also be used (e.g. "Away-lunch"
No, the Away status cannot be defined on a custom presence setting.
It works now, I don't know what was wrong but before whatever I typed in Activity – name of activity in client status was the same as availability (strange). So if I typed Online as Availability than as Activity I got "OnLine" name it was ignoring what was in activity. I found this problem when I got Exchange error connection (don't see relation).
Thanks anyway for your reply.
there seems to be a limit of 3 customStates I can add. is this a server restriction or? if I enter 4 into the xml, none load.
<customState ID="4" availability="Online">
<activity LCID="1033">Avail…4</activity>
</customState>
thanks for any input. great post. thx (available offline still also works :))
Kevin, I have not seen that before, I have 4 custom states on my client right now. There could be an error in your XML code somewhere (e.g. unclosed tag) which may be causing the miscount.
I have seen the same issue but with me it is the 5th entry.
Yes, that is expected as the client is limited to supporting only 4 custom presence settings.
despite of the fear of sounding like a complete moron, how do you get to/download/install the lync client on a workstation?
The client software is available online as a free eval version, otherwise the full version must be retrieved through a Microsoft Volume License or other official software distribution methods for Microsoft software.
Hi, thanks for the post. I can't get this to work for me, although I've set the CustomStateURL in my CSClientPolicy and in the registry on my local PC. Apart from turning on logging on the Lync client (which incidentally shows the correct CustomStateURL property), what other troubleshooting can I do? My Lync client is on the newest patch level (CU5 March 2012) but the server is still on CU4, could that be a reason why it doesn't work?
The server and/or client versions should not have any impact as this works even in the RTM release. I do not know what could be the cause of your issue.
Hi Jeff, I want to be able to turn off the feature that end users have enabled from your post above. I cannot seem to find the setting in the ClientPolicy.
Users are abusing the notifications! Would there be a way to enable all users to have an admin defined set of Statuses from wherever they work in the world and overwrite their settings?
You could use Group Policy in AD to push the configuration of that registry setting pointing all clients to look at either a local file you push to the workstation or a common file available over the network. In either case you would configure that file with the custom presence values you want and then the end users cannot change them. Although if the end-users are administrators of their workstations then they can disable this again in their registry, but anything pushed out by GPO will constantly refresh and I would think they would get tired of overwriting the changes and just give up (or write a script to 'fix' it again.) But then you have ammunition against them for breaking defined IT policies and you can proceed as you wish from there 🙂
[…] Anpassa närvarostatusmeddelanden […]
Jeff,
Great article. Thanks. Do you know if there is there a downside to disabling the security mode (EnableSIPHighSecurityMode)? Will the client communications be less secure when that is disabled?
Thank you!!
I'm not aware of any disadvantages and the TechNet documentation recommends this same change as well.
Works fine! Thanks a lot!!!
[…] Custom Presence State: http://blog.schertz.name/2010/11/adding-custom-presence-to-lync/ […]
Works good for me!
[…] Custom Presence State: http://blog.schertz.name/2010/11/adding-custom-presence-to-lync/ […]
Thanks Jeff! Based on your article I wrote a little HTA that sets this information for you, check it out: http://pastebin.com/vku1Le6U
I've tried this twice with no luck. Followed the instructions to the letter on my local laptop. Wondering if there some other setting on the server side that would prevent this from working?
[…] Custom Presence State: http://blog.schertz.name/2010/11/adding-custom-presence-to-lync/ […]
Same as for Laura – doesn't work after several tries.
Currently running .314 – is it a version-bound fix or are there other settings?
We have a migrated ocs-lync enviroment and due to illness still run CU4 on the server.
All of a sudden it worked. Found our old share (wich have never worked) with the Presence-file and when pointing the CustomStateURL there the custom values showed. Also I updated my client so it's one or the other…
dont have the communicator reg setting
Terry, you have to create the key if it does not already exist.
Is there a way to set Custom Presence on Microsoft Lync for Mac (version 14.02) ?
I've never tested this but it's possible that the in-band policy is utilized by the Mac client as well.
Thank you sir
I am using Lync 2010 on WinXP SP3 V2002. Works perfectly. Thanks a lot Jeff 🙂
Configuring Lync Custom Statuses To Support Assessment for Learning…
In our last post our guest contributor Mandeep Atwal talked about using Lync client to support assessment…
[…] Lync Server MVP, Jeff Schertz’ blog “Adding Custom Presence to Lync” […]
Just set up using Lync 2013. Works as designed! Thank you! (I have a special do not disturb status of "Banging Head on Desk!")
Didn't work here… Installed Lync 2013, and still having that problem after adding the new keys, twice…
Thanks Jef!!
This is just the solution I needed.
Did not know where to post this so posting it here, is there a way to not display presence information to selected federated partners?
You can block specific domains from federation, but you cannot hide presence yet still allow some other level of communications with any federated domains specifically.
Configuring Lync Custom Statuses To Support Assessment for Learning…
In our last post our guest contributor Mandeep Atwal talked about using Lync client to support assessment…
Can you use the 'Away' (Yellow) presence for custom ones. I've managed to get the custom presence to work, but everytime I change one to 'Away' or 'Appear Away'/'Appear-Away') everything disappears.
No, the only programmable states are Available (Green), Busy (Red), and DND (Dark Red). You cannot select an Away status other than the built-in options of Be Right Back, Off Work, or Appear Away.
Hello Jeff,
Great blog you have here! very very hand!
But I have a question, Since custom presence data is possible I was wondering if you know if its possible to add custom tags onto the front of messages XML allowing us to have different message levels?
So the user would select the level one message then type the message and hit enter, the other user would then receive a level one status message?
Not that I'm aware of, the extent of the customization is what I've documented.
Lync 2013 x64 won't work. Lync 2013 x86 worked just fine.
This works are described on my 64 bit OS and clients. Make sure you are using the correct path and not the Wow6432Node path which was previously used by the Lync 2010 client.
Not working on x86 too 🙁 🙁
[…] See article on custom presence states by MVP Jeff Schertz […]
worked with lync2010 but just upgraded to 2013 seems like its not possible.hmm
Make sure you are using the correct path in the registry as it's different in the Lync 2013 client (check the last section of the article).
Had to do a clean install of my lync 2013 and it worked this timearound.
Hi Jeff, Nice Post. Please apart from creating custom presence, is there away the administrator can disable the "Appear away status" on the lync status so that users can not set their status to it. I found out that most users set their status to "appear away"because they don't want to get bombardedwith IMs and tend to misinform other users about their availability. When ou IM such users, you found out that they are actually availbale. is there a powershell cmdlet or way to disable this status
You can disable the "Appear Offline' presence status by using the cmdlet to edit the EnableAppearOffline parameter.
Hey,
I think the original question was more about the “Appear Away” status, which completely undermines the presence system as it is set-and-forget making the user constantly appear away. Is there a way to disable that setting, or would one need to just deploy a full set of custom presence statuses that dont include that option?
Thanks,
Mark
Thanks Jeff, However, I just clicked on the link you sent but I couldn't find any cmdlet to disable this status. Can you help post the complete cmdlet to disable the "Appear Away" status from the Lync server so that Lync clients cannot use this status.
You need to expand the 'Parameters' section of that page to see all of the options.You need to set the "EnableAppearOffline" option to $false for your default client policy if you want to turn it off for everyone.
Very nice article, although raised another question. Is it possible to tie a custom presence with a particular meeting in Outlook/Exchange. For example, whenever I have a meeting with subject "customer presentation" it sets my presence to "customer presentation".
No, only the extended presence drop-down can be modified. The presence states from Exchange calendaer states are hard-coded (e.g. Busy in F/B triggers 'In a Meeting' presence).
I would like to do the "recommended" way by placing the .xml file in the external folder on the FE server but here is my issue…. external users can reach the address https://lyncext.domainname.com/LyncCustomPresence… without issue however… my internal users get a "server error – 404 – file not found" so internal users cannot use the external address. any ideas????
Ideally you shouldn't be using the Lync web server to publish that file as internal users typically can't resolve or access the external URLs. You should publish that file externally using a separate web server. The quick fix might be to include the external web services FQDN in the internal DNS zones but that might create other undesirable issues with Lync functionality in general.
Why to do such changes when there is a free tool out there. It's so easy to use. http://www.unifysquare.com/Custom-State-Presence-…
Is there any configuration to change the custom status icons?
No.
How can I get a custom message and have the yellow color sign to it (the one which shows for Appear Away). This is for Lync 2010. I can get a green color, red color and the dark red with a minus sign in between but what if I want that yellow color one what should I do then. I tried to put availability="away" but it doesn't work. Is there some other word that I need to put in order for it to work.
Gregory, you cannot set customer presence states using the 'Away' state. Only the states listed in this article are supported when using the custom configuration file (Available, Busy, DND). Lync only uses Away for dynamic updates and you cannot force that state, with the exception of enabling the hidden 'Appear Away' status in the Lync client policy, which I recommend against. Away status should indicate away, and busy should indicate unavailable states. It's poor practice to allow users to hide as 'Away' as that dilutes the accuracy of the presence engine and in my opinion degrades the overall value of the solution.
Thanks Jeff for replying. I'll keep that in mind.
Brilliant. I have used this feature ever since Communicator came out. Thanks for the fix for Lync 2013 as I rely on being able to set these 4 custom status values.
Hi Jeff… Great post! Thanks… Everything worked perfectly the first time. Being new to XML editing, I have a pretty simple, basic question regarding the line xmlns="http://schemas.micosoft.com/09/2009/communicator/customStates">. While this appears to be a URL for the schemas, I'm trying to understand what it is pointing to & the significance of 09/2009 in the line. I've reviewed other blogs & postings and have seen other references i.e. 09/2005. Thanks again…
Microsoft hosts and manages those reference files. I’ve never really looked into them in any more detail.
There is a simple tool which does this. Check below link https://sourceforge.net/projects/lyncstatuseditor…
If I put the "presence.xml" on a web server in a production environment, this will not impact the Lync clients for all users, correct? Just mine since I am pointing to the file from my registry?
Correct, only the clients which are pointed to that file will use it; either manually via the registry or via a Lync client policy (which you have not defined yet).
Doesn't work for me – anymore. I use Lync 2010.
I previously had 4 states. Completely missed that that's the maximum custom states count. So when I modified the XML file and added 2 more, it didn't show up in my Lync. Restored it back to the 4 states, it never came back again.
Any help would be appreciated. I followed the instructions for the Lync 2010 version. Have I missed anything?
I would delete the file and configuration, and then recreate it as 4 is the limit and it works the same way as I've documented.
Hey Jeff,
Hoestly, i don't know if there's something im doing wrong here, i cant seem to get custom states. I have followed each and every step Please advice.
I can't really say why it's not working, possible that is blocked by your administrator.
I've actually built a little utility to do just this, and some other hidden functions and facilities, I am looking for feedback
Microsoft Lync Custom Status Tools (LCS) – https://www.mikesel.info/lync-custom-status/
A little off topic, but is there any way to remove the ability to change status for Lync 2013 users completely? I'm asking as I've recently set up a response group for a helpdesk and At the moment, the agents regularly set their statuses to busy – removing them from the queue and preventing them getting calls.
I’m not aware of any way to do that with the standard Lync clients. That also sounds more like a training issue than a technical one 🙂
availability="Away" will this work as status away. tried but 🙁
No, you cannot manually define the Away status for custom states. Only Available, Busy, and DND are allowed.
Hello Jeff,
It worked, thanks to share this info.
Dimpy
hi Jeff,
i have problem with LYNC and BLUSTAR(VOIP CLIENT) when we make call from BLUSTAR LYNC status change to “In call”
we are using LYNC 2013 for this.. can’t find the way to fix it..!!
Sorry, I have no familiarity with that other VoIP client.
Thanks It works fine 🙂
Thanks Jeff, great post ! I can see the new status (I have office 2013) but other cannot see them. If I change only on my machine does the server need to be changed as well ?
If not, who cares.
Simon
No need to change anything on a server, so I’m not sure why the presence is not showing properly.
Is there a way to change the custom status colour? Availability used are Available, busy or do not disturb.. Can we create new availability with different colors?
No, only the options shown in this article are available.
how it works in Mobile client, I have tried the custom presence following your article and its working fine in desktop client. but in mobile device Iphone (Skype of business client) ,its not showing properly. Only the custom presence text is visible in the mobile device lync client. Is there any addition settings required?
Lync 2013
thanks
Jeevananthan
I’ve used this for years. Thanks! However, it stopped working with O365/S4B 2016. Are you aware of changes that make it work?
Doug, I haven’t used this myself in some time but others have reported that it no longer works with the SfB 16.x client. If I get a chance I’ll try to do some testing but it appears that maybe this feature has finally been dropped from the Windows Desktop client.
Hi,
Can I disable forwarding my presence status change to other , which is shown to other in popup if someone has added me to “Tag for status Change Alerts”
No, not without blocking the contact altogether.
Wonderful article! We are linking to this great post on our website. Keep up the good writing.