# Class ActiveDirectoryPlugin OptimaJet.Workflow.Plugins.ActiveDirectoryPlugin.ActiveDirectoryPlugin Plugin for working with Active Directory. Contains Actions and Authorization Rules. Namespace: [OptimaJet.Workflow.Plugins.ActiveDirectoryPlugin](https://api.workflowengine.io/active-directory-plugin/OptimaJet.Workflow.Plugins.ActiveDirectoryPlugin/) ```csharp public sealed class ActiveDirectoryPlugin : IWorkflowPlugin ``` ## Type Hierarchy - ActiveDirectoryPlugin Current type - Implemented interfaces - [IWorkflowPlugin](https://api.workflowengine.io/core/OptimaJet.Workflow.Plugins/IWorkflowPlugin/) ## Constructors `public ActiveDirectoryPlugin(ActiveDirectorySource source, LdapImplementation ldapImplementation = LdapImplementation.NovellLdap)` Creates plugin with specific source. ### Parameters | Name | Type | Description | | --- | --- | --- | | `source` | `ActiveDirectorySource` | The source. | | `ldapImplementation` | `LdapImplementation` | The LDAP protocol implementation. | `public ActiveDirectoryPlugin(List sources, LdapImplementation ldapImplementation = LdapImplementation.NovellLdap)` Creates plugin with specific sources. ### Parameters | Name | Type | Description | | --- | --- | --- | | `sources` | `List` | The list of sources. | | `ldapImplementation` | `LdapImplementation` | The LDAP protocol implementation. | `public ActiveDirectoryPlugin(IActiveDirectoryMethods activeDirectoryMethods)` Creates plugin with specific custom LDAP protocol implementation. ### Parameters | Name | Type | Description | | --- | --- | --- | | `activeDirectoryMethods` | `IActiveDirectoryMethods` | Custom LDAP protocol implementation. | ## Properties `public string Name { get; }` The plugin name. `public bool Disabled { get; set; }` Flag to disable plugin, if true - plugin is disabled, false otherwise. `public Dictionary PluginSettings { get; }` The plugin settings. ## Methods `public void OnPluginAdd(WorkflowRuntime runtime, List? schemes = null)` Called when a plugin is added to a runtime. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The instance of the runtime. | | `schemes` | `List` | The list of schemes for which the plugin is being added. | `public Task OnPluginRemoveAsync(WorkflowRuntime runtime)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task OnRuntimeStartAsync(WorkflowRuntime runtime)` Called when the runtime is started. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The instance of the runtime. | ### Returns | Type | Description | | --- | --- | | `Task` | A task that represents the asynchronous operation. | ## Fields `public readonly IActiveDirectoryMethods ActiveDirectoryMethods` [Next ActiveDirectorySource](https://api.workflowengine.io/active-directory-plugin/OptimaJet.Workflow.Plugins.ActiveDirectoryPlugin/ActiveDirectorySource/)