Skip to content

IAdmConfigurationParameters

The IAdmConfigurationParameters interface is designed to manage configuration parameters of an Adaxes service.

Inheritance: The IAdmConfigurationParameters interface inherits from the IUnknown interface.

Methods

Configuration Parameters

Details

GetAllParameters()

Returns values of all configuration parameters of the Adaxes service.

IAdmKeyValuePair[] GetAllParameters()

Examples

The following code sample outputs values of all configuration parameters of an Adaxes service.

[Reflection.Assembly]::LoadWithPartialName("Softerra.Adaxes.Adsi")

# Connect to the Adaxes service
$admNS = New-Object "Softerra.Adaxes.Adsi.AdmNamespace"
$admService = $admNS.GetServiceDirectly("localhost")

# Bind to the 'Configuration Set Settings' container
$configSetSettingsPath = $admService.Backend.GetConfigurationContainerPath(
    "ConfigurationSetSettings")
$configSetSettings = $admService.OpenObject($configSetSettingsPath, 
    $NULL, $NULL, 0)

# Output configuration parameters
$parameters = $configSetSettings.GetAllParameters()
Write-Host "Parameters:"
foreach ($parameter in $parameters)
{
    Write-Host "`tParameter:" $parameter.Key
    Write-Host "`tValue:" $parameter.Value
    Write-Host
}
using System;
using Softerra.Adaxes.Adsi;
using Softerra.Adaxes.Interop.Adsi;
using Softerra.Adaxes.Interop.Adsi.PersistentObjects;

class Program
{
    static void Main(string[] args)
    {
        // Connect to the Adaxes service
        AdmNamespace adsNS = new AdmNamespace();
        IAdmService admService = adsNS.GetServiceDirectly("localhost");

        // Bind to the 'Configuration Set Settings' container
        String configSetSettingsPath = admService.Backend.GetConfigurationContainerPath(
            "ConfigurationSetSettings");
        IAdmConfigurationParameters configSetSettings =
            (IAdmConfigurationParameters)admService.OpenObject(
            configSetSettingsPath, null, null, 0);

        // Output configuration parameters
        IAdmKeyValuePair[] parameters = configSetSettings.GetAllParameters();
        Console.WriteLine("Parameters:");
        foreach (var parameter in parameters)
        {
            Console.WriteLine("\tParameter: {0}", parameter.Key);
            Console.WriteLine("\tValue: {0}", parameter.Value);
            Console.WriteLine();
        }
    }
}

GetParameter()

Gets the value for a configuration parameter by name.

Object GetParameter(String name)

Parameters

The name parameter specifies the name of the configuration parameter to get.

Return value

An Object that represents the value of the parameter. For example, if you specify Adsi.ShowServerInErrorMessages, the method will return a Boolean value.

Examples

The following code sample outputs the value of the Adsi.ShowServerInErrorMessages parameter.

[Reflection.Assembly]::LoadWithPartialName("Softerra.Adaxes.Adsi")

# Connect to the Adaxes service
$admNS = New-Object "Softerra.Adaxes.Adsi.AdmNamespace"
$admService = $admNS.GetServiceDirectly("localhost")

# Bind to the 'Configuration Set Settings' container
$configSetSettingsPath = $admService.Backend.GetConfigurationContainerPath(
    "ConfigurationSetSettings")
$configSetSettings = $admService.OpenObject($configSetSettingsPath, 
    $NULL, $NULL, 0)

# Output the parameter value
$parameterValue = $configSetSettings.GetParameter("Adsi.ShowServerInErrorMessages")
Write-Host "Show server name in error messages:" $parameterValue
using System;
using System;
using Softerra.Adaxes.Adsi;
using Softerra.Adaxes.Interop.Adsi;
using Softerra.Adaxes.Interop.Adsi.PersistentObjects;

class Program
{
    static void Main(string[] args)
    {
        // Connect to the Adaxes service
        AdmNamespace adsNS = new AdmNamespace();
        IAdmService admService = adsNS.GetServiceDirectly("localhost");

        // Bind to the 'Configuration Set Settings' container
        String configSetSettingsPath = admService.Backend.GetConfigurationContainerPath(
            "ConfigurationSetSettings");
        IAdmConfigurationParameters configSetSettings =
            (IAdmConfigurationParameters)admService.OpenObject(
            configSetSettingsPath, null, null, 0);

        // Output the parameter value
        var parameterValue = configSetSettings.GetParameter("Adsi.ShowServerInErrorMessages");
        Console.WriteLine("Show server name in error messages: {0}", parameterValue);
    }
}

SetParameter()

Sets the value of the specified configuration parameter.

void SetParameter(String name, Object value)

Parameters

  • name – Specifies the name of the configuration parameter to set.
  • value – Specifies the new parameter value.

Examples

The following code sample sets the value of the Logging.SqlQueryTimeout parameter to 60 seconds.

[Reflection.Assembly]::LoadWithPartialName("Softerra.Adaxes.Adsi")

$timeoutSec = 60

# Connect to the Adaxes service
$admNS = New-Object "Softerra.Adaxes.Adsi.AdmNamespace"
$admService = $admNS.GetServiceDirectly("localhost")

# Bind to the 'Configuration Set Settings' container
$configSetSettingsPath = $admService.Backend.GetConfigurationContainerPath(
    "ConfigurationSetSettings")
$configSetSettings = $admService.OpenObject($configSetSettingsPath, 
    $NULL, $NULL, 0)

# Set the parameter value
$configSetSettings.SetParameter("Logging.SqlQueryTimeout", $timeoutSec)
using System;
using System;
using Softerra.Adaxes.Adsi;
using Softerra.Adaxes.Interop.Adsi;
using Softerra.Adaxes.Interop.Adsi.PersistentObjects;

class Program
{
    static void Main(string[] args)
    {
        const int timeoutSec = 60;

        // Connect to the Adaxes service
        AdmNamespace adsNS = new AdmNamespace();
        IAdmService admService = adsNS.GetServiceDirectly("localhost");

        // Bind to the 'Configuration Set Settings' container
        String configSetSettingsPath = admService.Backend.GetConfigurationContainerPath(
            "ConfigurationSetSettings");
        IAdmConfigurationParameters configSetSettings =
            (IAdmConfigurationParameters)admService.OpenObject(
            configSetSettingsPath, null, null, 0);

        // Set the parameter value
        configSetSettings.SetParameter("Logging.SqlQueryTimeout", timeoutSec);
    }
}

Adsi.ShowServerInErrorMessages

Specifies whether the name of a Domain Controller that was used to perform an operation will be included in error messages.

  • Type:
  • Boolean
  • Default value:
  • TRUE

Logging.SqlQueryTimeout

The timeout (in seconds) for loading log records from an external logging database.

  • Type:
  • Integer
  • Default value:
  • 30 (seconds)

O365.CheckTenantCredentialRights

If the parameter is set to TRUE, Adaxes checks whether the user account specified during Microsoft 365 tenant registration has administrative permissions within the Microsoft 365 organization. If the parameter is set to FALSE, Adaxes does not check account permissions in Microsoft 365. In that case you will be able to use any Microsoft 365 user account to register a tenant.

  • Type:
  • Boolean
  • Default value:
  • TRUE

Remarks

Administrative permissions within the Microsoft 365 organization are granted by either the Global Administrator or the User Management Administrator and the Exchange Administrator roles.


O365.StampExchangePropertiesPeriod

Specifies how often Adaxes updates the cache of information on Exchange Online recipients.

  • Type:
  • TimeSpan
  • Default value:
  • 3 hours

O365.IgnoreExchangeServices

Specifies which Microsoft 365 services contain word “Exchange” in their names, but do not provide possibility to have an Exchange Online mailbox.

  • Type:
  • String[]
  • Default value:
  • “EXCHANGE_S_ARCHIVE”, “EXCHANGE_L_STANDARD”

Remarks

This information is used by Adaxes to determine whether a user has an Exchange Online mailbox.


Adsi.ScriptExecutionTimeout

The timeout (in milliseconds) for running PowerShell scripts and external programs.

  • Type:
  • Int32
  • Default value:
  • 600000 (milliseconds)

Remarks

The parameter is supported starting with Adaxes version 2018.1.


O365.UpdateTenantDataPeriod

Specifies how often Adaxes updates the cache of Microsoft 365 tenant data.

  • Type:
  • TimeSpan
  • Default value:
  • 3 hours

Remarks

The parameter is supported starting with Adaxes version 2018.1.


O365.SuppressDirSyncedPropsUpdateWarnings

Specifies whether to display warnings informing that properties were updated locally in Active Directory and will be modified in Microsoft 365 after synchronization takes place.

  • Type:
  • TimeSpan
  • Default value:
  • 3 hours

Remarks

The parameter is supported starting with Adaxes version 2018.2.

Warning example

The following properties will be modified in Microsoft 365 after synchronization takes place: Alias.


Requirements

Minimum required version: 2013.2