SharePoint 2010 and Lync Integration different email address problem.


You wish to implement a custom webpart for SharePoint that integrates with OCS(Lync) to display user information such as presence
You’ve developed a custom code or webpart that using the javascript described here
http://blogs.msdn.com/b/uksharepoint/archive/2010/05/07/office-communicator-integration-presence-in-a-custom-webpart-for-sharepoint-2010.aspx
But you have faced that presence/pawn information look incorrect. Email adress are different. Like real  bugra@sip.blog.bugrapostaci.com shown instead of real email address of bugra@blog.bugrapostaci.com .

So this is a bydesign issue. Let explain how it is working:

Inside SharePoint we have a javascript library that resposible to show “presence” information named “INIT.JS” . It is a localized javascript file you can find this file
in SharePoint hive C:\program files\common files\microsoft shared\web  server extentions\14\TEMPLATE\Layouts\<your LCID code>\INIT.JS 
If you examine inside that code you will find that we are using an Office ActiveX control named NameCtrl . At the background the assembly of C:\Program Files\Microsoft Office\Office14\Name.dll which is loaded by browsers when you install office.
This ActiveX has responsible for communication and gather “Presence” information.
Users must have Office 2010, Office 2007, or Microsoft Office 2003 with the latest service pack installed to view extended presence information on a SharePoint Server page.
To display the presence indicator and its associated contact card (in Office 2010) or menu (in Office 2007 and Office 2003), SharePoint uses the Microsoft ActiveX control name.dll. The ActiveX control makes calls directly to the Microsoft Lync 2010 API, and then Lync makes MAPI or Exchange calls to supply the requested information.” http://technet.microsoft.com/en-us/library/gg398806.aspx

Presence is enabled in SharePoint by default; there are no configuration steps for the SharePoint administrator to perform. Each SharePoint page includes Microsoft JScript® code, which enables presence for that site. JScript uses name.dll to call the Lync API and pull presence for users names who appear on the site. JScript uses the users’ SIP URI to pull presence for names that are listed on the site. The following JScript code is an example of presence being pulled for a user named Bob Kelly, whose SIP URI is bobkelly@contoso.net. The SIP URI is added by using variables to the JScript when the script is loaded and presence is being pulled.

<a href=’jscript:;’ onclick=’IMNImageOnClick(event);return false;’ class=’ms-imnlink’><img name=’imnmark’ class=’ms-imnImg’ title=” border=’0′ height=’12’ width=’12’ src=’/_layouts/images/blank.gif’ alt=’No presence information’ sip=’bobkelly@contoso.net’ id=’imn_74,type=smtp’/></a><a onclick=”GoToLink(this);return false;” </a>

Please Check Resource Kit Book: SharePoint Integration
http://go.microsoft.com/fwlink/?LinkId=210991

it is not only bordered by SharePoint. You can easely develop a small ASP.Net application and can able to show Presence information.
Look for belowed code.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="TestIM._Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script type="text/javascript">

var sipUri = "bugra@blog.bugrapostaci.com";
var nameCtrl = new ActiveXObject('Name.NameCtrl.1');
if (nameCtrl.PresenceEnabled)
{
  nameCtrl.OnStatusChange = onStatusChange;
  nameCtrl.GetStatus(sipUri, "1");
}

function onStatusChange(name, status, id)
{ 
   alert(name + ", " + status + ", " + id);
}
function ShowOOUI()
{
   nameCtrl.ShowOOUI(sipUri, 0, 15, 15);
}
function HideOOUI()
{
   nameCtrl.HideOOUI();
}
</script>
</head>
<body>
 <form id="form1" runat="server">
   <div>
    <span onmouseover="ShowOOUI()" onmouseout="HideOOUI()" style="border-style:solid">Here is the contact info</span>
   </div>
 </form>
</body>
</html>

Also within the blog mentioned in the issue description http://blogs.msdn.com/b/uksharepoint/archive/2010/05/07/office-communicator-integration-presence-in-a-custom-webpart-for-sharepoint-2010.aspx

The key piece of information to make the presence work is the user’s SIP Address which is basically their IM address (This is not always the same as email address). When a users is either added to a site in SharePoint or has their profile imported, the SIP Address will be drawn from Active Directory which is where OCS stores it and placed into the SIP address field in either the user’s profile which will in turn synchronise down to the site’s local ‘User Information’ page.”

The problem is if your SIP address and default email address are different that you will see sip address on presence information by design:
So you can do:

1. To be sure for preventing other problems by Installing latest office pathces. For Today it is SP1 for Office 2010 + the hotfix 2553112 2553112 Description of the Office 2010 hotfix package (name-x-none.msp): August 30, 2011 http://support.microsoft.com/kb/2553112/EN-US

2. If a user’s SIP proxy address and the user’s default e-mail address are different the presence information cannot be shown.Make sure the user’s SIP proxy address and the user’s default e-mail address are the same.Make them same.
http://support.microsoft.com/kb/2006610

Advertisements

About bpostaci
Sr. Support Escalation Engineer in Microsoft.

One Response to SharePoint 2010 and Lync Integration different email address problem.

  1. Saravanan Shanmugam says:

    Really nice article.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: