Managed Email 2007::DeleteFolder
This procedure deletes a public folder.
This procedure for Hosted Messaging and Collaboration version 4.5 is updated to accept a GUID as an override to the organization parameter as well as to modify the permissions test in the case where a GUID is supplied.
Arguments
Input Arguments for Hosted Messaging and Collaboration version 4.0
Input Arguments | Type | Required | Description |
---|---|---|---|
<organization> |
string |
Yes |
The Lightweight Directory Access Protocol (LDAP) path of the organization. |
<preferredDomainController> |
string |
Yes |
The domain controller to use for Active Directory (AD) actions. |
<name> |
string |
Yes |
The name of the Public Folder. |
<server> |
string |
No |
This parameter specifies the server on which the public folder resides. If a server is not specified, the command checks if the local server is a Microsoft Exchange Server 2007 mailbox server with a public folder store. If it is, the public folder is created locally. If it is not, Exchange finds the closest (by site cost) Exchange 2007 mailbox server with a public folder store on which to create the public folder. |
<recurse> |
string |
No |
This parameter specifies that all subfolders of the specified folder should be removed. If the Recurse parameter is not specified and the public folder has subfolders, the command does not run and returns an error message. |
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 that owns the Public Folder. 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 that owns the public folder. |
<name> |
string |
Yes |
The name of the Public Folder. |
<path> |
string |
Yes |
This parameter specifies the location of the folder in the folder hierarchy. |
<server> |
string |
No |
This parameter specifies the server on which the public folder resides. This parameter is required if more than one Public Folder store is present. |
<recurse> |
string |
No |
This parameter specifies that all subfolders of the specified folder should be removed. If the Recurse parameter is not specified and the public folder has subfolders, the command does not run and returns an error message. |
<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 should avoid any calls to Active Directory.
- When a GUID is supplied, a more restrictive permissions test should be performed for DomainAdmins because a GUID assumes that the organization is deleted so we can not really validate organization ownership.
Security
If organization is specified, existing test for UserCreators is sufficient.
If GUID is specified, 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
<request>
<data>
<!--The GUID for organization own the public store. Both of the two formats are supported: {08fd2bcd-dcd6-4d80-9cd4-1e88069e37f8} or cd2bfd08d6dc804d9cd41e88069e37f8.-->
<GUID>cd2bfd08d6dc804d9cd41e88069e37f8</GUID>
<!--The domain controller to use for Active Directory actions.-->
<preferredDomainController>AD01.Fabrikam.Com</preferredDomainController>
<!--Specifies the name of the public folder.-->
<name>Legal</name>
<!--Specifies the location of the folder in the folder hierarchy, for example, \ for root level folders.-->
<path>\AlpineSkiHouse</path>
<!--Specifies the server on which the public folder resides.-->
<server>EXMBXOAB01</server>
<!--Specifies that all subfolders of the specified folder should be removed. If the Recurse parameter is not specified and the public folder has subfolders, the command does not run and returns an error message.-->
<recurse>true</recurse>
</data>
<procedure>
<execute namespace="Managed Email 2007" procedure="DeleteFolder" impersonate="1">
<before source="data" sourcePath="GUID" destination="executeData" mode="move" />
<before source="data" sourcePath="preferredDomainController" destination="executeData" mode="move" />
<before source="data" sourcePath="name" destination="executeData" mode="move" />
<before source="data" sourcePath="path" destination="executeData" mode="move" />
<before source="data" sourcePath="server" destination="executeData" mode="move" />
<before source="data" sourcePath="recurse" destination="executeData" mode="move" />
<after source="executeData" destination="data" mode="merge" />
</execute>
</procedure>
</request>
Example XML Response 1
<data>
<!--The LDAP Path of the organization-->
<organization>LDAP://OU=AlpineSkiHouse,OU=ConsolidatedMessenger,OU=Hosting,DC=Fabrikam,DC=Com</organization>
<!--The domain controller to use for Active Directory actions.-->
<preferredDomainController>AD01.Fabrikam.Com</preferredDomainController>
<!--Specifies the name of the public folder.-->
<name>Legal</name>
<!--Specifies the location of the folder in the folder hierarchy, for example, \ for root level folders.-->
<path>\AlpineSkiHouse</path>
<!--Specifies the server on which the public folder resides.-->
<server>EXMBXOAB01</server>
<!--Specifies that all subfolders of the specified folder should be removed. If the Recurse parameter is not specified and the public folder has subfolders, the command does not run and returns an error message.-->
<recurse>true</recurse>
</data>
</response>
Example XML Response 2
<response>
<data>
<!--
The GUID for organization own the public store.
-->
<GUID>cd2bfd08d6dc804d9cd41e88069e37f8</GUID>
<!--The domain controller to use for Active Directory actions.-->
<preferredDomainController>AD01.Fabrikam.Com</preferredDomainController>
<!--Specifies the name of the public folder.-->
<name>Legal</name>
<!--Specifies the location of the folder in the folder hierarchy, for example, \ for root level folders.-->
<path>\AlpineSkiHouse</path>
<!--Specifies the server on which the public folder resides.-->
<server>EXMBXOAB01</server>
<!--Specifies that all subfolders of the specified folder should be removed. If the Recurse parameter is not specified and the public folder has subfolders, the command does not run and returns an error message.-->
<recurse>true</recurse>
</data>
</response>
Applies To
Hosted Messaging and Collaboration version 4.5
Hosted Messaging and Collaboration version 4.0
See also
Other Resources
API Name [HMC SDK]
API Name [HMC SDK]
API Name [HMC SDK]
API Name [HMC SDK]
API Name [HMC SDK]
API Name [HMC SDK]