This topic has not yet been rated - Rate this topic

Code Sample: Management Service

Published: April 7, 2011

Updated: April 9, 2013

Applies To: Windows Azure

This sample illustrates how to use the Windows Azure Active Directory Access Control (also known as Access Control Service or ACS) Management Service. It consists of a single Visual Studio 2010 solution and six projects. One project, Common, contains a helper type that simplifies working with the Management Service. The other projects demonstrate how to work with different types of ACS entities. The code for this sample is located in the ManagementService subdirectory (C#\Management\ManagementService) of the Windows Azure Active Directory Access Control (ACS) Code Samples package.

Prerequisites

To run this sample, you will need:

  1. An account at the Windows Azure homepage (http://go.microsoft.com/fwlink/?LinkId=130560) and an Access Control namespace.

  2. Visual Studio 2010 (any version).

For more details, see ACS Prerequisites (http://go.microsoft.com/fwlink/?LinkId=221065).

Running the Sample

To run the sample

  1. Go to the Windows Azure Management Portal, sign in, and then click Active Directory.

  2. To create an Access Control namespace, click New, click App Services, click Access Control, and then click Quick Create. (Or, click Access Control Namespaces before clicking New.)

  3. To manage an Access Control namespace, select the namespace, and then click Manage. (Or, click Access Control Namespaces, select the namespace, and then click Manage.)

    This action opens the Access Control Service management portal.

  4. Click Management Service and then click the default ManagementClient account. You will see a set of credentials that can be used to access the Management Service. In this sample, we will use the password credential.

  5. To view the password, click Password.

  6. Copy the password into your clipboard.

  7. If you have not done so already, open the sample in Visual Studio.

  8. In the Common project, open the SamplesConfiguration.cs file, and locate the following lines of code:

    public const string ServiceNamespace = "...Copy Access Control Namespace..."; 
    public const string ManagementServiceIdentityKey = "...Copy Management Service Password...";
    
    
  9. Update the value of the ServiceNamespace field with the name of your Access Control namespace.

  10. Update the value of the ManagementServiceIdentityKey field with the password value in your clipboard.

  11. Build the solution.

  12. With the ManagementServiceHelper configured, you can start any of the other projects. Each of the projects sends results to the console.

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.
facebook page visit twitter rss feed newsletter