Export (0) Print
Expand All

Code Samples for the Windows Live Admin Center SDK

All connections to the web service require that users are authenticated by the Windows Live Admin Center service (via certificate or the Windows Live ID Network) before they can manage or retrieve status on any domain. Therefore, each of the following code samples requires authentication. When using Windows Live ID credentials to authenticate, you need to consider the importance of protecting these credentials through encryption, or assigning appropriate permissions to files and directories.

Note  

  • All code samples are written in the Visual Studio C# programming language. If you modify the source code, you will need Visual Studio 2005 (or later) to compile the code into an executable. Code examples are available for your use and experimentation in the SDK download.

  • Appendix B: Error Codes for Windows Live Admin Center SDK documents the error codes that can be returned by the web service.

Basic Command-line Sample Application

A basic sample command-line executable is included to manage members. The source code and compiled executable are included in the Cmdline directory.

Executable: <installation directory>\Cmdline\CommandLineTest.exe

Following are actions you can do from the command line.

  • Use certificate or Windows Live ID authentication.

  • Add, delete, and enumerate members.

  • Determine if a member is already in the domain.

  • Add new members by importing names from a comma-separated value (csv) file.

  • Enumerate domains owned by a single Windows Live ID account.

Advanced Command-line Sample Application

A more advanced sample command-line executable is included to manage members. The source code and compiled executable are included in the CmdlineAdv directory.

Executable: <installation directory>\CmdlineAdv\CommandLine.exe

Following are actions you can do from the command line.

  • Use certificate or Windows Live ID authentication.

  • Add, delete, and enumerate members.

  • Determine if a member is already in the domain.

  • Add new members by importing names from a .csv file.

  • Enumerate domains owned by a single Windows Live ID account.

Command-line samples are located in the CmdlineAdv\CommandLineAdvSamples.txt file.

Win32 Sample Application

The Win32 sample application includes a graphical user interface (GUI) for managing members by means of the web service. You can run this application on any Microsoft Windows operating system that has the .NET Framework 2.0 (or later) installed. The source code and compiled executable are included in the Win32app directory.

Executable: <installation directory>\Win32app\ManageDomain.exe

What you can do with the Win32 application:

  • Use certificate or Windows Live ID authentication.

  • Add, delete, and enumerate members.

  • Search for members.

  • Determine if a member is already in the domain.

  • Add new members by importing names from a .csv file.

  • Export members to a .csv file (uses the same format as import).

  • Enumerate domains owned by a single Windows Live ID account or certificate.

  • Modify properties for each member.

CSVSync Sample Application

A sample CSVSync command-line application is included to synchronize a .csv file with the domain members registered with Windows Live ID. The application compares the member list in the .csv file with the members registered in Windows Live ID and, depending on the options chosen:

  1. Adds any new member accounts to Windows Live ID.

  2. Deletes any member account found in Windows Live ID that is not in the .csv file.

The source code and compiled executable are included in the CSVSync directory.

Executable: <installation directory>\CSVSync\CSVSync.exe

Developer Support and Feedback

For developer support with these sample applications, please contact the Windows Live Admin Center team at dsupport@microsoft.com. If you have any feedback on these samples or using this SDK to write your own code, please send us email at dsupport@microsoft.com.

 

 

Send comments about this topic to Microsoft

Build date: 2/15/2011

Community Additions

ADD
Show:
© 2015 Microsoft