Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7812817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T04:38:15+00:00 2026-06-02T04:38:15+00:00

In a Trusted Application Endpoint I have to publish users states based on en

  • 0

In a Trusted Application Endpoint I have to publish users states based on en external presence provider, and I can do that (clearing them later when the external source goes “Idle” is a different problem)

What is a problem though is that if I publish a new state for User A, that is not reflected on that users own Lync Client, though everybody else get the updates.

At this moment I’m using this snippet of code to do the publishing:

    user.Endpoint.LocalOwnerPresence.BeginPublishPresence(
        user.categories,
        arBeginPublishPresence =>
        {
            try
            {
                user.Endpoint.PresenceServices.EndUpdatePresenceState(arBeginPublishPresence);
                logger.log("Published presence for {0} with state {1}.", user.SipUserUri, newState.Availability);
            }
            catch (RealTimeException ex)
            {
                logger.log("Failed publishing presence for {0}. {1}", user.SipUserUri, ex);
            }
        },
        null);

Where user.categories is:

            PresenceCategoryWithMetaData stateWithMetaDataForPersonal = new PresenceCategoryWithMetaData(++instanceId, 400, newState);
            PresenceCategoryWithMetaData stateWithMetaDataForWorkgroup = new PresenceCategoryWithMetaData(instanceId, 300, newState);
            PresenceCategoryWithMetaData stateWithMetaDataForColleagues = new PresenceCategoryWithMetaData(instanceId, 200, newState);
            PresenceCategoryWithMetaData stateWithMetaDataForExternal = new PresenceCategoryWithMetaData(instanceId, 100, newState);
            PresenceCategoryWithMetaData stateWithMetaDataForAll = new PresenceCategoryWithMetaData(instanceId, 0, newState);
            if (instanceId >= Int64.MaxValue)
            {
                instanceId = 1;
            }

            stateWithMetaDataForPersonal.ExpiryPolicy = expirypolicy;
            stateWithMetaDataForWorkgroup.ExpiryPolicy = expirypolicy;
            stateWithMetaDataForColleagues.ExpiryPolicy = expirypolicy;
            stateWithMetaDataForExternal.ExpiryPolicy = expirypolicy;
            stateWithMetaDataForAll.ExpiryPolicy = expirypolicy;

            stateWithMetaDataForPersonal.Expires = timeout;
            stateWithMetaDataForWorkgroup.Expires = timeout;
            stateWithMetaDataForColleagues.Expires = timeout;
            stateWithMetaDataForExternal.Expires = timeout;
            stateWithMetaDataForAll.Expires = timeout;

            user.categories =
                new List<PresenceCategoryWithMetaData>()
                        {
                            stateWithMetaDataForPersonal,
                            stateWithMetaDataForWorkgroup,
                            stateWithMetaDataForColleagues,
                            stateWithMetaDataForExternal,
                            stateWithMetaDataForAll
                        };

The categories are carpet bombing the presence state, and I just know I’m doing it wrong. It can not possible be this … messy.

Please bear with me, I’m new to C#, .NET and UCMA, never touched any of it till a month ago.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T04:38:16+00:00Added an answer on June 2, 2026 at 4:38 am

    This seems like the right behaviour to me. Lync will aggregate presence across ALL endpoints that the user is signed in on, to give a single presence state. For example, if the user is signed in to Lync on his PC with his presence set to “Away”, and also on his mobile client with a presence of “Available”, then all users will see an aggregated presence of “Available” – because he is available to reach on one of the endpoints. However, his Lync client will still be “Away”.

    So I think the same thing is happening for you. Your UCMA app is just another endpoint that you’re publishing presence from. You may be publishing a presence of “Available”, but it is presence from the endpoint in the UMCA app, so it won’t affect any other endpoints he’s signed in on, e.g. the Lync client. However, all other users will see the aggregated presence state.

    This is more of an educated guess than anything I’ve proven with code. I’ve had a scout through the SDK, but I can’t see any way to “override” the other endpoint’s presence (and actually, doing that strongly feels like the wrong behaviour).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application that needs to support a small set of trusted users
I'm publishing a user presence in a Trusted Application Endpoint, but I also would
How can I add an URL to the trusted site? It seems that there
I am trying to set up a web page where trusted users can upload
I have a web application set up on our intranet that uses windows authentication
I have an application that uses a database on SQL Server and I want
We have a .net based application hosted with SAP enterprise portal iframes. The domain
I am building a web application that will essentially allow authenticated users access to
I'm deploying an xbap application that runs as a full-trusted app. To get permissions
I have a java application that needs to connect to a server. Its rather

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.