locked
How to get Domain name of Lync RRS feed

  • Question

  • Hi

    i want to create an application that gives me Lync online domain, so how it can be done using Lync Client?

    Thanks in advance.......

    Thursday, September 27, 2012 7:36 AM

Answers

  • :-)  Yeah.  Now that I recall, that is true.  Unofficially though, it works *most of the time*.

    The most reliable way to get the domain would be to use the LyncClient.GetClient().Uri property which returns the signed in user. You can also read the LyncClient.GetClient().Self.Contact.Uri which returns the same Uri.


    John Austin Senior Programming Writer Microsoft

    Wednesday, October 3, 2012 10:38 PM

All replies

  •         private void ShowSignInConfiguration()
            {
                SignInConfiguration signinConfiguration = LyncClient.GetClient().SignInConfiguration;
                Console.WriteLine("User name and domain: " + signinConfiguration.UserName);
            }
    

    The UserName property returns a string like bobS@contoso.com.  You parse the string for the domain which will be the domain that the user has signed in to.

    John Austin Senior Programming Writer Microsoft

    Thursday, September 27, 2012 4:11 PM
  • John

    The according to the documentation, the UserName property of SignInConfiguration "sets the display name for anonymous user" and "...is reserved and must not be used".

    Would LyncClient.GetClient().Uri be more correct?


    -- Richard Carde

    Monday, October 1, 2012 11:38 AM
  • :-)  Yeah.  Now that I recall, that is true.  Unofficially though, it works *most of the time*.

    The most reliable way to get the domain would be to use the LyncClient.GetClient().Uri property which returns the signed in user. You can also read the LyncClient.GetClient().Self.Contact.Uri which returns the same Uri.


    John Austin Senior Programming Writer Microsoft

    Wednesday, October 3, 2012 10:38 PM