/// <summary>
        /// Performs the command.
        /// </summary>
        private static void PerformCommand()
        {
            HttpRequestMessage request = null;

            // ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, sslPolicyErrors) => true;

            try
            {
                AuthenticationHelper.Init(Inputs.TenantId, Inputs.ClientId);
                if (Inputs.Tokens != null)
                {
                    TokenCacheHelper.CacheContent = Convert.FromBase64String(Inputs.Tokens);
                }

                // Login as global admin of the Azure AD B2C tenant
                UserMode.LoginAsAdmin();

                // Graph client does not yet support trustFrameworkPolicy, so using HttpClient to make rest calls
                switch (Inputs.Command)
                {
                case Commands.LIST:
                {
                    // List all policies using "GET /trustFrameworkPolicies"
                    request = UserMode.HttpGet(Constants.TrustFrameworkPolicesUri);
                    var response = SendRequest(request);
                    PrintListOfPolicies(response);
                    break;
                }

                case Commands.GET:
                {
                    // Get a specific policy using "GET /trustFrameworkPolicies/{id}"
                    request = UserMode.HttpGetID(Constants.TrustFrameworkPolicyByIDUri, Inputs.PolicyId);
                    var response = SendRequest(request);
                    SavePolicyToFile(response);
                    PrintGeneric("Get operation ", response);
                    break;
                }

                case Commands.CREATE:
                {
                    // Create a policy using "POST /trustFrameworkPolicies" with XML in the body
                    string xml = System.IO.File.ReadAllText(Inputs.Path);
                    request = UserMode.HttpPost(Constants.TrustFrameworkPolicesUri, xml);
                    var response = SendRequest(request);
                    PrintGeneric("Create operation", response);
                    break;
                }

                case Commands.UPDATE:
                {
                    // Update using "PUT /trustFrameworkPolicies/{id}" with XML in the body
                    string xml = System.IO.File.ReadAllText(Inputs.Path);
                    request = UserMode.HttpPutID(Constants.TrustFrameworkPolicyByIDUri, Inputs.PolicyId, xml);
                    var response = SendRequest(request);
                    PrintGeneric("Update operation", response);
                    break;
                }

                case Commands.DELETE:
                {
                    // Delete using "DELETE /trustFrameworkPolicies/{id}"
                    request = UserMode.HttpDeleteID(Constants.TrustFrameworkPolicyByIDUri, Inputs.PolicyId);
                    var response = SendRequest(request);
                    PrintGeneric("Delete operation", response);
                    break;
                }

                case Commands.GETTOKENS:
                {
                    PrintTokens();
                    break;
                }

                default:
                    return;
                }
            }
            catch (Exception e)
            {
                Print(request);
                Console.WriteLine("\nError {0} {1}", e.Message, e.InnerException != null ? e.InnerException.Message : "");
            }
        }