/// <summary>
        /// This method demonstrates how this api can be used to get monitoring account and metric configuration information.
        /// These objects can be modified and saved as well, which is not demonstrated here due to permissions.
        /// </summary>
        public static void GetConfigurations()
        {
            // Replace 31280E2F2D2220808315C212DF8062A295B28325 with your cert thumbprint,
            // install it to the "Personal\Certificates" folder in the "Local Computer" certificate store,
            // and grant the permission of reading the private key to the service/application using the MDM consumption APIs.
            string testCertificateThumbprint = "31280E2F2D2220808315C212DF8062A295B28325";

            var connectionInfo = new ConnectionInfo(testCertificateThumbprint, StoreLocation.LocalMachine, MdmEnvironment.Int);

            var manager = new MonitoringAccountConfigurationManager(connectionInfo);

            var account = manager.GetAsync("MetricTeamInternalMetrics").Result;

            Console.WriteLine("------- ACCOUNT INFORMATION -------");
            Console.WriteLine("Users: {0}", string.Join(", ", account.Permissions.Where(x => x is UserPermission).Select(x => x.Identity)));
            Console.WriteLine("SecurityGroups: {0}", string.Join(", ", account.Permissions.Where(x => x is SecurityGroup).Select(x => x.Identity)));
            Console.WriteLine("Certificates: {0}", string.Join(", ", account.Permissions.Where(x => x is Certificate).Select(x => x.Identity)));

            var metricConfigurationManager = new MetricConfigurationManager(connectionInfo);

            var metric    = metricConfigurationManager.GetAsync(account, "metrics.server", "clientPostCount").Result;
            var rawMetric = (RawMetricConfiguration)metric;

            Console.WriteLine("\n------- RAW METRIC INFORMATION -------");
            Console.WriteLine("Dimensions: {0}", string.Join(",", rawMetric.Dimensions));
            Console.WriteLine("Preaggregates: {0}", string.Join(",", rawMetric.Preaggregations.Select(x => x.Name)));

            metric = metricConfigurationManager.GetAsync(account, "metrics.server", "AccountThrottlingWatchdog").Result;
            var compositeMetric = (CompositeMetricConfiguration)metric;

            Console.WriteLine("\n------- COMPOSITE METRIC INFORMATION -------");

            Console.WriteLine("CompositeExpressions: {0}", string.Join(",", compositeMetric.CompositeExpressions.Select(x => x.Expression)));
            Console.WriteLine(
                "FirstMetricSource: {0} - {1} - {2}",
                compositeMetric.MetricSources.First().MonitoringAccount,
                compositeMetric.MetricSources.First().MetricNamespace,
                compositeMetric.MetricSources.First().Metric);

            var metricsServerMetrics = metricConfigurationManager.GetMultipleAsync(account, "Metrics.Server").Result;

            Console.WriteLine("\n------- MULTIPLE METRIC INFORMATION -------");
            Console.WriteLine("Name of all metrics under Metrics.Server namespace: {0}", string.Join("\n", metricsServerMetrics.Select(x => x.Name)));

            Console.WriteLine("\n############################ END OF GetConfigurations ##############################");
        }