Question

I am using the Persona component for my SPFx web part.

The React component looks like this:

<Persona
   {...examplePersona}
   size={PersonaSize.size10}
   presence={PersonaPresence.offline}
   hidePersonaDetails={!renderPersonaDetails}
/>

How do I determine what to put in for presence based on the information I get from the User Profile service? I do get SPS-SipAddress back, but I'm lost on how to get presence from there.

Was it helpful?

Solution

The User Profile Service doesn't provide information about a user's presence. SharePoint, or Delve for that matter, doesn't keep track of a user's presence so it cannot give you that information.

You should probably hook up to the communication system your company's using, like Skype for Business or MS Teams.

An example implementation of how to connect to Skype for Business using the UCWA JS SDK can be found here, in an SPFx sample web part.

I'm currently unaware of examples using Teams as a source for determining presence.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top