Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

XADM: The CDOEXM IMailboxStore::CreateMailbox() or IMailboxStore::MoveMailbox() Method Fails


View products that this article applies to.

Symptoms

If you run the IMailboxStore::CreateMailbox() method or the IMailboxStore::MoveMailbox() method from CDO for Exchange Management (CDOEXM), and you are using an account that does not use the same security context as the Exchange 2000 server, the CreateMailbox() or the MoveMailbox() method may fail.

In the following code sample, the ADS code succeeds:
' ADS code succeeds
Dim objUser As IADsUser
Set objUser = objOpenDSO.OpenDSObject(sUsersDN, "domain1\Administrator", "password",ADS_SECURE_AUTHENTICATION)
				
Then the IMailboxStore interface on the same object fails:
' IMailboxStore interface on the same object fails
Dim objMailbox As CDOEXM.IMailboxStore
Set objMailbox = objUser
objMailbox.CreateMailbox(sPrivMdbDN)
				
The CreateMailbox() method fails with an access denied error when the application is not run under the domain/Exchange Administrator account.

The CreateMailbox() member function does a security check against the Exchange 2000 security settings. This security check should succeed because objUser was created using the Administrator credentials.

↑ Back to the top


Cause

This problem occurs because Exchange 2000 has to impersonate the Administrator account to use remote procedure call (RPC) to the remote computer. This requires local logon rights for the Administrator account for which credentials are passed.

↑ Back to the top


Workaround

To work around this problem, run the code under a context that is a local Administrator on the Exchange 2000 server.

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in Microsoft Exchange 2000 Server.

↑ Back to the top


Keywords: KB317234, kbnofix, kbbug

↑ Back to the top

Article Info
Article ID : 317234
Revision : 5
Created on : 2/28/2007
Published on : 2/28/2007
Exists online : False
Views : 227