Adding Custom Presence to Lync

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.

  1. Create a new XML file on the local workstation and customize the presence states and descriptions.
  2. Disable SIP High Security Mode within Lync.
  3. 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="">  <customState ID="1" availability="Busy">
    <activity LCID="1033">Urgent Interruptions Only</activity>
  <customState ID="2" availability="Busy">
    <activity LCID="1033">Customer Demo</activity>
  <customState ID="3" availability="Busy">
    <activity LCID="1033">In a Video Call</activity>
  <customState ID="4" availability="Busy">
    <activity LCID="1033">In Training Session</activity>

  • 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="">
  <customState ID="1" availability="Busy">
    <activity LCID="1033">Urgent Interruptions Only</activity>
  <customState ID="2" availability="Online">
    <activity LCID="1033">Customer Demonstration</activity>
  <customState ID="3" availability="Busy">
    <activity LCID="1033">Customer Demonstration</activity>
  <customState ID="4" availability="Do-Not-Disturb">
    <activity LCID="1033">Customer Presentation</activity>

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.


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 "

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



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


About Jeff Schertz
Site Administrator


80 Responses to “Adding Custom Presence to Lync”
  1. mitch says:

    Cant seem to make customer presence work when setting availability to anything but "busy"

  2. Apryl says:

    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!

  3. Håkan says:

    Hi Jeff
    First thx for a great post.
    According to
    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?

    • jeffschertz says:

      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.

  4. MD Aslam says:

    worked for me… thank you …

  5. Vivek Gupta says:

    You rock Jeff…. It worked just fine. Thanks

    • Jason says:

      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.

  6. Anonymous says:

    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?

    • jeffschertz says:

      If there are currently no policies defined then the Communicator key under Policies will not exist, you need to manually create it first.

  7. Rick says:

    works!!! Thanks Jeff!

  8. Dave says:

    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?

  9. Tom says:

    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?

    • jeffschertz says:

      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.

  10. Tom says:

    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.

  11. KevinB says:

    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>

    thanks for any input. great post. thx (available offline still also works :) )

    • jeffschertz says:

      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.

    • Guest says:

      I have seen the same issue but with me it is the 5th entry.

  12. abe says:

    despite of the fear of sounding like a complete moron, how do you get to/download/install the lync client on a workstation?

    • jeffschertz says:

      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.

  13. TimD says:

    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?

    • jeffschertz says:

      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.

  14. TGreene says:

    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?

    • jeffschertz says:

      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 :)

  15. JeffJ says:

    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!!

    • jeffschertz says:

      I'm not aware of any disadvantages and the TechNet documentation recommends this same change as well.

  16. Works fine! Thanks a lot!!!

  17. Matt says:

    Works good for me!

  18. Moktarino says:

    Thanks Jeff! Based on your article I wrote a little HTA that sets this information for you, check it out:

  19. laura says:

    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?

  20. Johan Svanborg says:

    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.

  21. Johan Svanborg says:

    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…

  22. terry says:

    dont have the communicator reg setting

  23. Noam Bunder says:

    Is there a way to set Custom Presence on Microsoft Lync for Mac (version 14.02) ?

  24. Manny says:

    Thank you sir

  25. Microsoft User says:

    I am using Lync 2010 on WinXP SP3 V2002. Works perfectly. Thanks a lot Jeff :-)

  26. Steve_in_Fla says:

    Just set up using Lync 2013. Works as designed! Thank you! (I have a special do not disturb status of "Banging Head on Desk!")

    • Randy says:

      Didn't work here… Installed Lync 2013, and still having that problem after adding the new keys, twice…

  27. Robert says:

    Thanks Jef!!
    This is just the solution I needed.

  28. Mahendran says:

    Did not know where to post this so posting it here, is there a way to not display presence information to selected federated partners?

    • jeffschertz says:

      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.

  29. Tim says:

    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.

    • jeffschertz says:

      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.

  30. Andrew says:

    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?

  31. ben says:

    Lync 2013 x64 won't work. Lync 2013 x86 worked just fine.

  32. kenneth says:

    worked with lync2010 but just upgraded to 2013 seems like its not possible.hmm

    • jeffschertz says:

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

  33. kenneth says:

    Had to do a clean install of my lync 2013 and it worked this timearound.

  34. Habeeb Kolawole says:

    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

  35. Habeeb Kolawole says:

    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.

    • jeffschertz says:

      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.

  36. lynctech says:

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

    • jeffschertz says:

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

  37. Michael says:

    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… without issue however… my internal users get a "server error – 404 – file not found" so internal users cannot use the external address. any ideas????

    • jeffschertz says:

      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.

  38. Nick says:

    Why to do such changes when there is a free tool out there. It's so easy to use.

  39. Natt says:

    Is there any configuration to change the custom status icons?

  40. Gregory Rodrigues says:

    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.

    • jeffschertz says:

      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.

  41. flyscotusa says:

    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.

  42. RichA says:

    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=""&gt;. 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…

  43. Sant says:

    There is a simple tool which does this. Check below link

Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!