This documentation is archived and is not being maintained.

Changing the Password

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Follow the instructions in Compiling a Sample to build and run the sample to change the password.

using System;
using System.Net;
using Microsoft.LiveMeeting;

namespace WebSample
{
  class WebSampleClass
  {
    [STAThread]
    static void Main(string[] args)
    {
      try
      {
         LMWebService lmWebService = new LMWebService();
         lmWebService.Url = "https://localhost/LMPortal/LMWebService.asmx";
         lmWebService.Credentials = CredentialCache.DefaultCredentials;

         string lmUserId;
         string name;
         string role;
         string password = @"ABCDwxyz!$%^1234";
         string windowsId = @"contoso\bill";

         Status outcome = lmWebService.ChangePassword(windowsId, password, out lmUserId, out name, out role);
         if (outcome == Status.Success)
         {
            Console.WriteLine("Password changed for user " + windowsId);
            Console.WriteLine("lmUserId: " + lmUserId);
            Console.WriteLine("name: " + name);
            Console.WriteLine("role: " + role);
         }
         else
         {
            Console.WriteLine("Password not changed for user " + windowsId +
                              " due to error " + outcome);
         }
      }
      catch (Exception ex)
      {
        Console.WriteLine("Exception=" + ex);
      }
    }
  }
}
Show: