// POST
        public ActionResult CreateTenantManually(string organizationName, string issuerName, string iPStsAddress, string adminClaimType, string adminClaimValue, HttpPostedFileBase certificateFile, HttpPostedFileBase logoFile, string costCenterClaimType)
        {
            string organizationInternalName = this.SanitizeString(organizationName);

            if (this.IsOrganizationNameValid(organizationInternalName))
            {
                Organization organization = new Organization {
                    Name = organizationInternalName, DisplayName = organizationName, LogoPath = "~/Content/images/generic-logo.png"
                };

                if (logoFile != null && logoFile.ContentLength > 0)
                {
                    var imageFolderRelativePath = "~/Content/images/";
                    var imageFolderAbsolutePath = Server.MapPath("~/");
                    imageFolderAbsolutePath = string.Concat(imageFolderAbsolutePath, "..\\f-shipping.7\\Content\\images\\");
                    var fileName     = string.Concat(organizationInternalName, "-logo.png");
                    var fileFullPath = string.Concat(imageFolderAbsolutePath, fileName);
                    logoFile.SaveAs(fileFullPath);
                    organization.LogoPath = string.Concat(imageFolderRelativePath, fileName);
                }

                OrganizationRepository organizationRepository = new OrganizationRepository();
                organizationRepository.AddOrganization(organization);
                ServiceManagementWrapper acsWrapper = new ServiceManagementWrapper(acsServiceNamespace, acsUsername, acsPassword);

                // add the new IP
                var    identityProviderName = issuerName;
                byte[] signingCertBytes     = new byte[certificateFile.InputStream.Length];
                certificateFile.InputStream.Read(signingCertBytes, 0, (int)certificateFile.InputStream.Length);
                acsWrapper.AddIdentityProviderManually(identityProviderName, iPStsAddress, WebSSOProtocolType.WsFederation, signingCertBytes, null);

                var ruleGroup = string.Format("Default role group for {0}", organizationInternalName);

                this.CreateRelyingParty(organizationInternalName, identityProviderName, ruleGroup, acsWrapper);
                this.CreateRulesForTenantWithOwnIP(organizationInternalName, identityProviderName, acsWrapper, ruleGroup, adminClaimType, adminClaimValue, costCenterClaimType);


                return(View("CompleteEnrollment"));
            }
            return(View("EnrollManually", new EnrollmentViewModel {
                ErrorMessage = "Organization name not valid", OrganizationName = organizationName
            }));
        }