2015-07-23

Persistent Chat is a Microsoft Skype for Business (Lync) role that lets you create topic-based discussion rooms that persist over time.  These rooms allow users to communicate and collaborate with a group of people who have a common area of interest.  Sharing ideas and information by posting in real time along with maintaining those messages allows for new and old room participants to see all the chat history at any time.

Every Skype for Business (Lync) chat room has a privacy level which controls who can find it and who can get into it. Administrators can control access to chat rooms by creating chat room categories and specifying access to categories and rooms within those categories.

Categories are a way to organize chat rooms and control which users and groups are permitted to create or join the rooms within the categories. Each category has associated properties that determine options available and specify security. It is important to understand that allowed or denied members of a category are not the same as assigning users to be members of specific rooms. Users cannot be added as a member of a chat room if the parent category prevents it. This is so that organizations can prevent sharing of information with users who should not be allowed to see it.

In addition to allowed and denied members for categories, administrators can control access to chat rooms by assigning a user role.

• Creator – permission to create a chat room

• Manager – manage properties of the chat room

• Member – users who can see chat rooms in the directory

• Presenter – Users who can post to an auditorium style room

The chat room owner sets the privacy level when the room is first setup.

• Open – Let anyone find the room, see who is in it and read posts

• Closed – Let anyone find the room, see who is in it but only members can read posts

• Secret – only members can find this room and read posts

The migration process of a Persistent Chat Pool from one site to another is pretty straight forward. Make sure that the account executing PowerShell and connecting to the database has the proper permissions. (RTCUniversalServerAdmins and CsPersistentChatAdministrator).  Inspect the rooms, categories, members, managers and take a backup of the old persistent chat databases.

Export the data from the old pool to a zip file using the Lync Server Management Shell  execute:  Export-CsPersistentChatData –DBInstance “SQLPChatFQDN\instance” –FileName “C:\temp\PersistentChatData.zip” -verbose

Ensure that the Persistent Chat pool services are stopped in the new pool and import the data in to the new database.  From the Lync Server Management shell execute:    Import-CsPersistentChatData –DBInstance “SQLPhatFQDN\Instance” –Filename “c:\temp\PersistentChatData.zip”

Verify the import by viewing the log file and inspect any warnings.



In this case, there was a Warning associated with “Import Categories”.   Don’t ignore the warning.



The Warning is actually an error.

“Warning: Error with ID:<GUID ID of Category> ;Name=<Category Name> Message=”Principals are disabled”:sip:user@domain.com”;Reproduce with: ….

It means that the category is not going to be imported because the database table tblPrincipal is set to disabled because the user’s SIP capabilities are disabled. This is true. The user had left the company. Because the rooms are tied to categories in the database, this also generated warnings associated with the import of the rooms as well.



Looking further down in the log file shows another working under Import Chat Rooms. Again the Import Chat Room Warning is actually an error:

“Warning: Error with ID=<Guid ID of Chat Room>; Name=”<Chat Room Name>”:Message ”Node does not exist”:<GUID of Category>”;….

This means that any room associated with the category that failed to import is also not going to import.

To resolve this issue re-active the disabled user in Lync, AD and in SQL. Enabling in Lync and AD is straight forward. SQL is a different story. Open SQL management Studio and connect to the Old Persistent Chat database

1. Use SQL to query for the user’s sip address mentioned in the Import-Category Warning message above

SELECT * FROM [mgc].[dbo].[tblPrincipal]
WHERE prinUri=”sip:user@domain.com”

Look for the column prinDisabled and verify the setting.

https://technet.microsoft.com/en-us/library/gg558667%28v=ocs.15%29.aspx?f=255&MSPPError=-2147217396

2. Use SQL Query to update the table and set the Principal as Active.
UPDATE [mgc].[dbo].[tblPrincipal]
SET prinDisabled=”0”
WHERE prinUri=”sip:user@domain.com”

3. Export the data from the missing category only

Export-CsPersistentChatData  -level All -scope “<Category Name>” –DBInstance “Old-SQLPChatFQDN\instance” –FileName “C:\temp\PersistentChat-  Category.zip” –verbose

4. Rerun the Import-CsPersistentChatData
Import-CsPersistentChatData –DBInstance “New-SQLPhatFQDN\Instance” –Filename “c:\temp\PersistentChat-Category.zip”

This time verifying the log showed no warnings.

Don’t forget to copy any uploaded files from the old Persistent Chat file store to the new Persistent Chat file store xcopy \\ <old pchat file store> \1-PersistentChat-Service-2 \\ <new pchat file store>\1-PersistentChatService-3 /E /H /Y

After starting the persistent chat services in the new persistent chat pool, the missing categories and rooms were imported correctly. Now go ahead and remove the membership of that disabled user and revoke lync and AD permissions.

The post Skype for Business Persistent Chat – Migration Lessons when there are Disabled Users appeared first on New Signature.

Show more