public IList <ConfigParameterDefinition> GetConfigParameters(KeyedCollection <string, ConfigParameter> configParameters, ConfigParameterPage page) { List <ConfigParameterDefinition> configParametersDefinitions = new List <ConfigParameterDefinition>(); switch (page) { case ConfigParameterPage.Connectivity: configParametersDefinitions.Add(ConfigParameterDefinition.CreateStringParameter(ConfigParameterNames.TenantUrl, string.Empty)); configParametersDefinitions.Add(ConfigParameterDefinition.CreateEncryptedStringParameter(ConfigParameterNames.ApiKey, string.Empty)); configParametersDefinitions.Add(ConfigParameterDefinition.CreateStringParameter(ConfigParameterNames.LogFileName, string.Empty)); break; case ConfigParameterPage.Global: configParametersDefinitions.Add(ConfigParameterDefinition.CreateCheckBoxParameter(ConfigParameterNames.IncludeBuiltInGroups, false)); configParametersDefinitions.Add(ConfigParameterDefinition.CreateCheckBoxParameter(ConfigParameterNames.IncludeAppGroups, false)); configParametersDefinitions.Add(ConfigParameterDefinition.CreateDividerParameter()); configParametersDefinitions.Add(ConfigParameterDefinition.CreateDropDownParameter(ConfigParameterNames.UserDeprovisioningAction, new string[] { "Delete", "Deactivate" }, false, "Deactivate")); configParametersDefinitions.Add(ConfigParameterDefinition.CreateCheckBoxParameter(ConfigParameterNames.ActivateNewUsers, false)); configParametersDefinitions.Add(ConfigParameterDefinition.CreateCheckBoxParameter(ConfigParameterNames.SendActivationEmailToNewUsers, false)); break; case ConfigParameterPage.Partition: break; case ConfigParameterPage.RunStep: break; } return(configParametersDefinitions); }
public void GetConfigParameters(KeyedCollection <string, ConfigParameter> existingParameters, IList <ConfigParameterDefinition> newDefinitions, ConfigParameterPage page) { switch (page) { case ConfigParameterPage.Connectivity: newDefinitions.Add(ConfigParameterDefinition.CreateStringParameter(ConfigParameterNames.TenantDomain, string.Empty)); newDefinitions.Add(ConfigParameterDefinition.CreateStringParameter(ConfigParameterNames.ClientId, string.Empty)); newDefinitions.Add(ConfigParameterDefinition.CreateEncryptedStringParameter(ConfigParameterNames.Secret, string.Empty)); break; case ConfigParameterPage.Global: newDefinitions.Add(ConfigParameterDefinition.CreateLabelParameter(ConfigParameterNames.FilterQueryDescription)); newDefinitions.Add(ConfigParameterDefinition.CreateStringParameter(ConfigParameterNames.FilterQuery, string.Empty)); newDefinitions.Add(ConfigParameterDefinition.CreateDividerParameter()); newDefinitions.Add(ConfigParameterDefinition.CreateLabelParameter(ConfigParameterNames.ChannelNameFilterDescription)); newDefinitions.Add(ConfigParameterDefinition.CreateStringParameter(ConfigParameterNames.ChannelNameFilter, string.Empty)); newDefinitions.Add(ConfigParameterDefinition.CreateDividerParameter()); newDefinitions.Add(ConfigParameterDefinition.CreateLabelParameter(ConfigParameterNames.RandomizeChannelNameOnDeleteDecription)); newDefinitions.Add(ConfigParameterDefinition.CreateCheckBoxParameter(ConfigParameterNames.RandomizeChannelNameOnDelete, false)); newDefinitions.Add(ConfigParameterDefinition.CreateDividerParameter()); newDefinitions.Add(ConfigParameterDefinition.CreateLabelParameter(ConfigParameterNames.UsersToIgnoreDescription)); newDefinitions.Add(ConfigParameterDefinition.CreateTextParameter(ConfigParameterNames.UsersToIgnore)); newDefinitions.Add(ConfigParameterDefinition.CreateDividerParameter()); newDefinitions.Add(ConfigParameterDefinition.CreateCheckBoxParameter(ConfigParameterNames.SetSpoReadOnly, false)); break; case ConfigParameterPage.Partition: break; case ConfigParameterPage.RunStep: break; } }
public IList <ConfigParameterDefinition> GetConfigParameters( KeyedCollection <string, ConfigParameter> configParameters, ConfigParameterPage page) { var configParametersDefinitions = new List <ConfigParameterDefinition>(); if (page == ConfigParameterPage.Global) { configParametersDefinitions.Add(ConfigParameterDefinition.CreateCheckBoxParameter("Use mockup data")); } IList <ConfigParameterDefinition> customParameters = GetEzmaConfigParameters(configParameters, page); if (customParameters != null) { configParametersDefinitions.AddRange(customParameters); } //NOTE: need this because ezmas are seemingly requierd to have at least one connection attribute if (page == ConfigParameterPage.Connectivity && configParametersDefinitions.Count == 0) { configParametersDefinitions.Add(ConfigParameterDefinition.CreateStringParameter("RequiredEmptyParameter", null, "IgnoreThisValue")); } return(configParametersDefinitions); }
IList <ConfigParameterDefinition> IMAExtensible2GetParameters.GetConfigParameters(System.Collections.ObjectModel.KeyedCollection <string, ConfigParameter> configParameters, ConfigParameterPage page) { Tracer.Enter("getconfigparameters"); Tracer.Indent(); try { List <ConfigParameterDefinition> configParametersDefinitions = new List <ConfigParameterDefinition>(); switch (page) { case ConfigParameterPage.Connectivity: configParametersDefinitions.Add(ConfigParameterDefinition.CreateLabelParameter("The Schema script is called to retrieve the object and attribute definitions. This script should be accessible to the FIM Synchronization Service service account during configuration and refreshes of the schema.")); configParametersDefinitions.Add(ConfigParameterDefinition.CreateStringParameter(Constants.Parameters.SchemaScript, "")); configParametersDefinitions.Add(ConfigParameterDefinition.CreateDividerParameter()); configParametersDefinitions.Add(ConfigParameterDefinition.CreateLabelParameter("Authentication (optional): These credentials are passed as parameters to all scripts.")); configParametersDefinitions.Add(ConfigParameterDefinition.CreateStringParameter(Constants.Parameters.Username, "")); configParametersDefinitions.Add(ConfigParameterDefinition.CreateEncryptedStringParameter(Constants.Parameters.Password, "")); configParametersDefinitions.Add(ConfigParameterDefinition.CreateDividerParameter()); configParametersDefinitions.Add(ConfigParameterDefinition.CreateLabelParameter("Impersonation (optional): If username and password below are specified (domain optional), the specified user is used to run all scripts. If not specified, the scripts are run in the security context of the FIM Synchronization Service service account.")); configParametersDefinitions.Add(ConfigParameterDefinition.CreateStringParameter(Constants.Parameters.ImpersonationDomain, "")); configParametersDefinitions.Add(ConfigParameterDefinition.CreateStringParameter(Constants.Parameters.ImpersonationUsername, "")); configParametersDefinitions.Add(ConfigParameterDefinition.CreateEncryptedStringParameter(Constants.Parameters.ImpersonationPassword, "")); break; case ConfigParameterPage.Global: configParametersDefinitions.Add(ConfigParameterDefinition.CreateLabelParameter("Scripts")); configParametersDefinitions.Add(ConfigParameterDefinition.CreateLabelParameter("These are the PowerShell scripts that are run on the different operations. You should specify the full path of the scripts. Path cannot include spaces or similar whitespaces.")); configParametersDefinitions.Add(ConfigParameterDefinition.CreateStringParameter(Constants.Parameters.ImportScript, "")); configParametersDefinitions.Add(ConfigParameterDefinition.CreateStringParameter(Constants.Parameters.ExportScript, "")); configParametersDefinitions.Add(ConfigParameterDefinition.CreateCheckBoxParameter(Constants.Parameters.UsePagedImport, false)); configParametersDefinitions.Add(ConfigParameterDefinition.CreateDividerParameter()); configParametersDefinitions.Add(ConfigParameterDefinition.CreateLabelParameter("If you enable Password Management, this script is called for both password change and set (requires PCNS).")); configParametersDefinitions.Add(ConfigParameterDefinition.CreateStringParameter(Constants.Parameters.PasswordManagementScript, "")); configParametersDefinitions.Add(ConfigParameterDefinition.CreateDividerParameter()); configParametersDefinitions.Add(ConfigParameterDefinition.CreateLabelParameter("The objects piped to the export script will normally be of type PSCustomObject. If you uncheck this, you will get objects of more complex type CSEntryChange instead (legacy behaviour). For more information on the CSEntryChange object type, please see MSDN Library.")); configParametersDefinitions.Add(ConfigParameterDefinition.CreateCheckBoxParameter(Constants.Parameters.ExportSimpleObjects, true)); break; case ConfigParameterPage.Partition: break; case ConfigParameterPage.RunStep: break; } return(configParametersDefinitions); } catch (Exception ex) { Tracer.TraceError("getconfigparameters", ex); throw; } finally { Tracer.Exit("getconfigparameters"); } }
public System.Collections.Generic.IList <ConfigParameterDefinition> GetConfigParameters(System.Collections.ObjectModel.KeyedCollection <string, ConfigParameter> configParameters, ConfigParameterPage page) { List <ConfigParameterDefinition> configParametersDefinitions = new List <ConfigParameterDefinition>(); switch (page) { case ConfigParameterPage.Connectivity: //we have to configure the MAs being seletected in the Connectivity page so that the information //will be available to us when fetching the schema for the items selected configParametersDefinitions.Add(ConfigParameterDefinition.CreateLabelParameter("Enable provisioning for the following types:")); //look up MAs and list them as check boxes for provisioning enablement DataSet mas = FIMConfiguration.GetManagementAgents(null); foreach (DataRow ma in mas.Tables["Config"].Rows) { string maName = ma["ma_name"].ToString(); string maType = ma["ma_type"].ToString(); string maList = ma["ma_listname"].ToString(); if (maType.Equals("FIM", StringComparison.InvariantCultureIgnoreCase) || maList.Equals("Provisioning Management Agent (Insight)", StringComparison.InvariantCultureIgnoreCase)) { continue; } //our data will come back as XML data, we will need to parse it for what we need XmlDocument xmldoc = FIMConfiguration.GetConfigXML(maName, "ma_schema_xml"); XmlNamespaceManager xmlnsManager = new XmlNamespaceManager(xmldoc.NameTable); xmlnsManager.AddNamespace("dsml", "http://www.dsml.org/DSML"); xmlnsManager.AddNamespace("ms-dsml", "http://www.microsoft.com/MMS/DSML"); //TODO: what happens when a sql column defines the object type? XmlNodeList objectTypes = xmldoc.SelectNodes("//dsml:directory-schema/dsml:class", xmlnsManager); foreach (XmlNode ot in objectTypes) { //add the object type as a selection ConfigParameterDefinition conf = ConfigParameterDefinition.CreateCheckBoxParameter(maName + " - " + ot.Attributes["id"].Value.Replace(" - ", " _ ")); configParametersDefinitions.Add(conf); } //TODO: what happens to the UI when we have a alot of entries? configParametersDefinitions.Add(ConfigParameterDefinition.CreateDividerParameter()); } break; case ConfigParameterPage.Global: break; case ConfigParameterPage.Partition: break; case ConfigParameterPage.RunStep: break; } return(configParametersDefinitions); }
public static IList <ConfigParameterDefinition> GetParameters(KeyedCollection <string, ConfigParameter> configParameters, ConfigParameterPage page) { List <ConfigParameterDefinition> parameters = new List <ConfigParameterDefinition>(); switch (page) { case ConfigParameterPage.Capabilities: break; case ConfigParameterPage.Connectivity: parameters.Add(ConfigParameterDefinition.CreateLabelParameter("Credentials")); parameters.Add(ConfigParameterDefinition.CreateStringParameter(ManagementAgentParametersBase.CustomerIDParameter, null, "my_customer")); parameters.Add(ConfigParameterDefinition.CreateStringParameter(ManagementAgentParametersBase.DomainParameter, null, null)); parameters.Add(ConfigParameterDefinition.CreateStringParameter(ManagementAgentParametersBase.ServiceAccountEmailAddressParameter, null, null)); parameters.Add(ConfigParameterDefinition.CreateStringParameter(ManagementAgentParametersBase.UserEmailAddressParameter, null, null)); parameters.Add(ConfigParameterDefinition.CreateStringParameter(ManagementAgentParametersBase.KeyFilePathParameter, null)); parameters.Add(ConfigParameterDefinition.CreateEncryptedStringParameter(ManagementAgentParametersBase.KeyFilePasswordParameter, null, null)); parameters.Add(ConfigParameterDefinition.CreateDividerParameter()); parameters.Add(ConfigParameterDefinition.CreateStringParameter(ManagementAgentParametersBase.LogFilePathParameter, null)); break; case ConfigParameterPage.Global: parameters.Add(ConfigParameterDefinition.CreateStringParameter(ManagementAgentParametersBase.UserRegexFilterParameter, null, null)); parameters.Add(ConfigParameterDefinition.CreateStringParameter(ManagementAgentParametersBase.GroupRegexFilterParameter, null, null)); parameters.Add(ConfigParameterDefinition.CreateStringParameter(ManagementAgentParametersBase.ContactRegexFilterParameter, null, null)); parameters.Add(ConfigParameterDefinition.CreateCheckBoxParameter(ManagementAgentParametersBase.ExcludeUserCreatedGroupsParameter, false)); parameters.Add(ConfigParameterDefinition.CreateDividerParameter()); parameters.Add(ConfigParameterDefinition.CreateLabelParameter("The Google API supports filtering users based on query parameters. For example, to filter on org unit, type 'orgUnitPath=/MyOrgUnit'. Refer to the API documentation at https://developers.google.com/admin-sdk/directory/v1/guides/search-users for more information")); parameters.Add(ConfigParameterDefinition.CreateStringParameter(ManagementAgentParametersBase.UserQueryFilterParameter, null, null)); parameters.Add(ConfigParameterDefinition.CreateDividerParameter()); parameters.Add(ConfigParameterDefinition.CreateCheckBoxParameter(ManagementAgentParametersBase.InheritGroupRolesParameter, false)); parameters.Add(ConfigParameterDefinition.CreateLabelParameter("Inheriting group roles forces the MA to include owners in the managers list, and managers in the members list")); parameters.Add(ConfigParameterDefinition.CreateDividerParameter()); parameters.Add(ConfigParameterDefinition.CreateCheckBoxParameter(ManagementAgentParametersBase.CalendarSendNotificationOnPermissionChangeParameter, false)); parameters.Add(ConfigParameterDefinition.CreateDividerParameter()); parameters.Add(ConfigParameterDefinition.CreateStringParameter(ManagementAgentParametersBase.ContactsPrefixParameter, null, "contact:")); parameters.Add(ConfigParameterDefinition.CreateDividerParameter()); parameters.Add(ConfigParameterDefinition.CreateCheckBoxParameter(ManagementAgentParametersBase.SkipMemberImportOnArchivedCoursesParameter, false)); parameters.Add(ConfigParameterDefinition.CreateLabelParameter("Skipping import of students and teachers on ARCHIVED Courses can speed up import if you have many Archived course objects.")); break; case ConfigParameterPage.Partition: break; case ConfigParameterPage.RunStep: parameters.Add(ConfigParameterDefinition.CreateCheckBoxParameter(ManagementAgentParametersBase.DoNotGenerateDeltaParameter, false)); break; case ConfigParameterPage.Schema: parameters.Add(ConfigParameterDefinition.CreateLabelParameter("The values from the following objects are flattened based on the type of object specified. Enter the types you wish to expose, each on a separate line (ctrl-enter for a new line). For example, entering 'work' and 'home' in the phone numbers text box will expose the attributes phones_work and phones_home")); parameters.Add(ConfigParameterDefinition.CreateTextParameter(ManagementAgentParametersBase.PhonesFixedTypeFormatParameter, null)); parameters.Add(ConfigParameterDefinition.CreateDividerParameter()); parameters.Add(ConfigParameterDefinition.CreateTextParameter(ManagementAgentParametersBase.OrganizationsFixedTypeFormatParameter, null)); parameters.Add(ConfigParameterDefinition.CreateDividerParameter()); parameters.Add(ConfigParameterDefinition.CreateTextParameter(ManagementAgentParametersBase.IMsFixedTypeFormatParameter, null)); parameters.Add(ConfigParameterDefinition.CreateDividerParameter()); parameters.Add(ConfigParameterDefinition.CreateTextParameter(ManagementAgentParametersBase.ExternalIDsFixedTypeFormatParameter, null)); parameters.Add(ConfigParameterDefinition.CreateDividerParameter()); parameters.Add(ConfigParameterDefinition.CreateTextParameter(ManagementAgentParametersBase.RelationsFixedTypeFormatParameter, null)); parameters.Add(ConfigParameterDefinition.CreateDividerParameter()); parameters.Add(ConfigParameterDefinition.CreateTextParameter(ManagementAgentParametersBase.AddressesFixedTypeFormatParameter, null)); parameters.Add(ConfigParameterDefinition.CreateDividerParameter()); parameters.Add(ConfigParameterDefinition.CreateTextParameter(ManagementAgentParametersBase.EmailsFixedTypeFormatParameter, null)); parameters.Add(ConfigParameterDefinition.CreateDividerParameter()); parameters.Add(ConfigParameterDefinition.CreateTextParameter(ManagementAgentParametersBase.WebsitesFixedTypeFormatParameter, null)); parameters.Add(ConfigParameterDefinition.CreateDividerParameter()); parameters.Add(ConfigParameterDefinition.CreateDividerParameter()); parameters.Add(ConfigParameterDefinition.CreateDropDownParameter(ManagementAgentParametersBase.CalendarBuildingAttributeTypeParameter, new string[] { "String", "Reference" }, false, "String")); parameters.Add(ConfigParameterDefinition.CreateDropDownParameter(ManagementAgentParametersBase.CalendarFeatureAttributeTypeParameter, new string[] { "String", "Reference" }, false, "String")); parameters.Add(ConfigParameterDefinition.CreateDropDownParameter(ManagementAgentParametersBase.GroupMemberAttributeTypeParameter, new string[] { "String", "Reference" }, false, "Reference")); parameters.Add(ConfigParameterDefinition.CreateDividerParameter()); parameters.Add(ConfigParameterDefinition.CreateLabelParameter("Specify additional custom user object classes to expose. (Press ctrl+enter for each new line)")); parameters.Add(ConfigParameterDefinition.CreateTextParameter(ManagementAgentParametersBase.CustomUserObjectClassesParameter, null)); var config = new ManagementAgentParameters(configParameters); if (config.KeyFilePath != null && !string.IsNullOrEmpty(config.KeyFilePassword) && config.Certificate != null) { parameters.Add(ConfigParameterDefinition.CreateDividerParameter()); parameters.Add(ConfigParameterDefinition.CreateCheckBoxParameter(ManagementAgentParametersBase.EnableAdvancedUserAttributesParameter, false)); parameters.Add(ConfigParameterDefinition.CreateLabelParameter("Enabling advanced user attributes enables managing delegate and send-as settings, however this can significantly slow down the speed of full imports. A separate API call must be made for every user during the import process for each of these selected attributes.")); parameters.Add(ConfigParameterDefinition.CreateCheckBoxParameter(ManagementAgentParametersBase.MakeNewSendAsAddressesDefaultParameter, false)); } break; default: break; } return(parameters); }