Hosted Active Directory::Unsubscribe

The procedure removes the Active Directory (AD) plan from the specified organization.

This procedure for Hosted Messaging and Collaboration version 4.5 is updated to accept a GUID as an override to the path parameter as well as to make planName an optional parameter. The procedure instead looks up the Plan assignment for the organization based on the organization GUID.

Arguments

Input Arguments for Hosted Messaging and Collaboration version 4.0

Input Arguments Type Required Description

<path>

string

Yes

Required parameter. The Lightweight Directory Access Protocol (LDAP) path of the organization.

<planName>

string

Yes

Required parameter. The name of the plan.

<preferredDomainController>

string

Yes

Required parameter. The name of the preferred domain controller.

Input Arguments for Hosted Messaging and Collaboration version 4.5

Input Arguments Type Required Description

<GUID>

string

Yes if <organization> is not specified

The GUID of the organization to unsubscribe.

GUID should only be specified when the organization object is no longer found in Active Directory. That is, Organization has been orphaned.

<organization>

string

Yes if <GUID> is not specified

The LDAP path of the organization to query in Resource Manager (RM).

<planName>

string

No

Organization plan to unsubscribe from. If it is not supplied, the procedure will look up the appropriate plan based on GUID or organization.

<preferredDomainController>

string

Yes

The domain controller to use for Active Directory operations. Use the fully qualified domain name (FQDN) of the domain controller that you want to use.

Output arguments

A successful request will mirror the input data.

Remarks

Note

When a GUID is supplied, this procedure must assume that the Organization as well as the child objects do not exist in Active Directory. If a GUID is supplied, the procedure avoids any calls to Active Directory.

Procedure Step

  • Managed Plans::RemovePlanFromCustomer

Security

  1. If organization is specified, existing test for userCreators.

  2. If GUID is specified, the procedure must test for more restrictive DomainAdmins.

Error Handling

Error Condition Error Text

Neither GUID nor path specified

You must supply either a <GUID> or <path> element.

Active Directory object referenced by GUID exists.

The object with GUID %GUID% was found in Active Directory. This GUID parameter should only be used when the corresponding Active Directory object has been deleted.

Sample Code

Example XML Request 1

<request xmlns:xsl="https://www.w3.org/1999/XSL/Transform"> 
        <procedure xmlns:xsl='https://www.w3.org/1999/XSL/Transform'> 
                <execute namespace="Hosted Active Directory" procedure="Unsubscribe" impersonate="1"> 
                        <executeData> 
                                <path>LDAP://OU=Alpineskihouse,OU=ConsolidatedMessenger,OU=Hosting,DC=Fabrikam,DC=Com</path> 
                                <preferredDomainController>ad01.fabrikam.com</preferredDomainController> 
                        </executeData> 
                        <after source="executeData" destination="data" mode="merge"/> 
                </execute> 
        </procedure> 
</request>

Example XML Request 2

<request xmlns:xsl="https://www.w3.org/1999/XSL/Transform"> 
  <data> 
    <preferredDomainController>AD01.Fabrikam.Com</preferredDomainController> 
    <planName>BusinessPlan</planName> 
    <GUID>3459316ef1b043439a0ac9de3ee90eef</GUID> 
  </data> 
  <procedure xmlns:xsl="https://www.w3.org/1999/XSL/Transform"> 
    <execute namespace="Hosted Active Directory" procedure="Unsubscribe" impersonate="1"> 
      <before source="data" sourcePath="preferredDomainController" destination="executeData" mode="move" /> 
      <before source="data" sourcePath="planName" destination="executeData" mode="move" /> 
      <before source="data" sourcePath="GUID" destination="executeData" mode="move" /> 
      <after source="executeData" destination="data" mode="merge" /> 
    </execute> 
  </procedure> 
</request>

Example XML Response

<response> 
  <data> 
    <preferredDomainController>AD01.Fabrikam.Com</preferredDomainController> 
    <planName>BusinessPlan</planName> 
    <GUID>3459316ef1b043439a0ac9de3ee90eef</GUID> 
  </data> 
</response>

Applies To

Hosted Active Directory Namespace API for:

  • Hosted Messaging and Collaboration version 4.5

  • Hosted Messaging and Collaboration version 4.0

See also

Tasks

Hosted Active Directory::Subscribe