Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsWindows Server 2003Windows 2000Windows NTSmall Business ServerVirtual ServerExchange ServerIISHost Integration ServerISA ServerSMSWSUSMOMWindows Media ServerSecurityCertification
Related Topics
SQL ServerMS WindowsMS OfficePC HardwareMore Topics ...

Windows Server Forum / Exchange Server / Applications / March 2007

Tip: Looking for answers? Try searching our database.

query on MAPI "GetMsgStoresTable" call...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
shivaraj - 14 Mar 2007 10:17 GMT
Hi,
I have some doubts wrt MAPI "GetMsgStoresTable" call. I already posted
a similer query but this is in general. Please help me in
understanding this concept.

1. If I create a profile on Administrator mailbox account and use this
session for "GetMsgStoresTable", will it give me all mailbox stores
under the "StorageGroup" ? ( what we see in Microsoft Exchange
SystemManager window )
  In my case my system manger is showing me 4 mailbox stores i.e
Mailbox Store 1 , Mailbox Store 2, Mailbox Store 3 and Mailbox Store
4. But if I iterate through all rows of "GetMsgStoresTable", I am
getting only 2 rows as
PR_DISPLAY_NAME : Mailbox - Administrator and PR_DISPLAY_NAME : Public
Folders. Why this is so? How can I get the info what is showed in
System manager using MAPI ?

2. I have a parent and child domain setup. My exchange server resides
in child domain. If I run my code ( C++ code to get mailbox
information ) with Administrative privilages of child domain, i am
able to retrieve all info. But if i create a user and make it as
domain admin and try to run my code, its failing during
"HrOpenExchangePrivateStore" call. Any extra permissions are required
for this?

Please let me know your views.

Regards,
Shivaraj
Dave Goldman [MSFT] - 15 Mar 2007 04:22 GMT
Your question:

1. If I create a profile on Administrator mailbox account and use this
session for "GetMsgStoresTable", will it give me all mailbox stores under
the "StorageGroup" ? ( what we see in Microsoft Exchange SystemManager
window ). In my case my system manger is showing me 4 mailbox stores i.e
Mailbox Store 1 , Mailbox Store 2, Mailbox Store 3 and Mailbox Store
4. But if I iterate through all rows of "GetMsgStoresTable", I am getting
only 2 rows as PR_DISPLAY_NAME : Mailbox - Administrator and PR_DISPLAY_NAME
: Public Folders. Why this is so? How can I get the info what is showed in
System manager using MAPI ?

Reply: When you get the store table you will get your personal store for
your mailbox (the profile you are logged in as) and the public folder store.
You then get props off of the store table to grab the entryid's to open
other system folders. The ESM uses RPC to communicate with the store and is
also reading objects from the configuration container and that is how you
are getting your display. You wont get the same display grabbing the store
table.

In the Active Directory Sites and Services, mailbox store and public folder
store objects are represented by leaf nodes that do not contain child
objects. In Exchange System Manager, however, mailbox store and public
folder store objects are represented as nodes in the console tree. They
contain several child containers, such as Logons, Mailboxes or Public
Folders, Public Folder Instances, etc. The Exchange System Manager performs
the following steps when it connects to the Exadmin virtual directory:

1. Obtains list of Exchange stores from hierarchy object   Exchange System
Manager reads the msExchOwningPFTreeBL attribute of the public folder
hierarchy object in Active Directory. This determines the list of Exchange
servers that host public stores associated with the public folder hierarchy.

2. Selects target server and retrieves Exadmin binding information
Exchange System Manager selects a server that contains a replica of the
public folder hierarchy and then reads the configuration information of that
server's Exadmin virtual directory. The Exadmin virtual directory is
represented in Active Directory by a directory object, named Exadmin, which
resides under the server's default HTTP virtual server, named Exchange
Virtual Server. The msExchServerBindings attribute of that directory object
contains the TCP port number that Exchange System Manager must use to
connect to the Exadmin virtual directory on the Exchange server that hosts
the public folder hierarchy. If this attribute is not set, Exchange System
Manager uses the default TCP port 80.

3. Uses binding information to connect to the Exadmin virtual directory
Exchange System Manager uses the TCP port number obtained from the
msExchServerBindings attribute to connect to the Exadmin virtual directory
on the selected Exchange server. It then requests a list of all top level
public folders in the hierarchy. In the HTTP User-Agent header of the HTTP
request, Exchange System Manager identifies itself as an Exchange Admin
client. Internet Information Services (IIS) authenticates the client and
returns the list of top level public folders to Exchange System Manager.

Running you code with domain admin rights should work being that it is part
of the administrators group. What is the HRESULT that is being returned from
HrOpenExchangePrivateStore?

Signature

This posting is provided "AS IS" with no warranties, and confers no rights.

Dgoldman
http://blogs.msdn.com/dgoldman
Download OABInteg from here:
http://gotdotnet.com/Community/UserSamples/Download.aspx?SampleGuid=A2338E73-F52
1-4071-9B1D-AAF49C346ACD


> Hi,
> I have some doubts wrt MAPI "GetMsgStoresTable" call. I already posted
[quoted text clipped - 25 lines]
> Regards,
> Shivaraj
shivaraj - 15 Mar 2007 06:10 GMT
On Mar 15, 8:22 am, "Dave Goldman [MSFT]"
<Dgold...@noreply.microsoft.com> wrote:
> Your question:
>
[quoted text clipped - 91 lines]
>
> - Show quoted text -

Hi Dave,
Thanks for your reply.

> Running you code with domain admin rights should work being that it is part
> of the administrators group. What is the HRESULT that is being returned from
> HrOpenExchangePrivateStore?

   I made this user ( user1 )as part of "Administrators" group as
well. Now the user created in child domain has got "Domain Users",
"Domain Admins" and "Administrators" group privilages. After this
"HrOpenExchangePrivateStore" succeeds but "GetMailboxTable" call
failes with MAPI_E_NO_ACCESS. And even if i login to exchange server
machine with this user, in system manager i am unable to see
"Administrative Groups" hierarchy also. So is it something like only
Administrator of child domain will be having this access ? or do i
need to give any special permissions to user1 to get this info??

Regards,
Shivaraj
Dave Goldman [MSFT] - 15 Mar 2007 12:35 GMT
When you call HrOpenExchangePrivateStore you are trying to locate the
primary user information store provider. Even know you created the new user
did you actually log in and create any mail to so the store creates the
mailbox tables? Even know the user account and profile are created you need
to log in one time.

Signature

This posting is provided "AS IS" with no warranties, and confers no rights.

Dgoldman
http://blogs.msdn.com/dgoldman
Download OABInteg from here:
http://gotdotnet.com/Community/UserSamples/Download.aspx?SampleGuid=A2338E73-F52
1-4071-9B1D-AAF49C346ACD


> On Mar 15, 8:22 am, "Dave Goldman [MSFT]"
> <Dgold...@noreply.microsoft.com> wrote:
[quoted text clipped - 136 lines]
> Regards,
> Shivaraj
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.