IAdmManagedDomainContainer

The IAdmManagedDomainContainer interface provides helper methods for registering managed domains in Adaxes.

Inheritance: IAdmTop

To use the IAdmManagedDomainContainer interface, you need to bind to the well-known Managed Domains container where managed domains are stored.

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

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

# Bind to the 'Managed Domains' container.
$managedDomainsPath = $service.Backend.GetConfigurationContainerPath("ManagedDomains")
$managedDomainContainer = $service.OpenObject($managedDomainsPath, $null, $null, 0)
C#
using Softerra.Adaxes.Adsi;
using Softerra.Adaxes.Interop.Adsi.PersistentObjects;
class Program
{
    static void Main(string[] args)
    {
        // Connect to the Adaxes service.
        AdmNamespace ns = new AdmNamespace();
        IAdmService service = ns.GetServiceDirectly("localhost");

        // Bind to the 'Managed Domains' container.
        string managedDomainsPath = 
            service.Backend.GetConfigurationContainerPath("ManagedDomains");
        IAdmManagedDomainContainer managedDomainContainer = 
            (IAdmManagedDomainContainer)service.OpenObject(
            managedDomainsPath, null, null, 0);
    }
}

Methods

Details

EnsureCanConnectToDomain()

Throws an exception if the connection to the specified domain fails.

void EnsureCanConnectToDomain(string domainName)

Parameters

  • domainName – Specifies the fully-qualified name of the domain.

GetAzureInitialDomainName()

Returns the full name of the Entra domain for the initial registration.

string GetAzureInitialDomainName(
    string tenantId, 
    string applicationId,
    string secret, 
    AzureNationalCloud nationalCloud)

Parameters

  • tenantId – Specifies the identifier of the Microsoft Entra tenant.
  • applicationId – Specifies the identifier of the application in Microsoft Entra that will be used to manage the domain.
  • secret – Specifies the client secret for the application that will be used to manage the domain.
  • nationalCloud – Specifies the national cloud where the domain is located.

Requirements

Minimum required version: 2023

See also