Discussion:
query on MAPI "GetMsgStoresTable" call...
(too old to reply)
shivaraj
2007-03-14 09:17:20 UTC
Permalink
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]
2007-03-15 03:22:22 UTC
Permalink
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?
--
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-F521-4071-9B1D-AAF49C346ACD
Post by shivaraj
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
shivaraj
2007-03-15 05:10:14 UTC
Permalink
On Mar 15, 8:22 am, "Dave Goldman [MSFT]"
Post by shivaraj
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
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?
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Dgoldmanhttp://blogs.msdn.com/dgoldman
Download OABInteg from here:http://gotdotnet.com/Community/UserSamples/Download.aspx?SampleGuid=A...
Post by shivaraj
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- Hide quoted text -
- Show quoted text -
Hi Dave,
Thanks for your reply.
Post by shivaraj
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]
2007-03-15 11:35:07 UTC
Permalink
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.
--
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-F521-4071-9B1D-AAF49C346ACD
Post by shivaraj
On Mar 15, 8:22 am, "Dave Goldman [MSFT]"
Post by shivaraj
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
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?
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Dgoldmanhttp://blogs.msdn.com/dgoldman
Download OABInteg from
here:http://gotdotnet.com/Community/UserSamples/Download.aspx?SampleGuid=A...
Post by shivaraj
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- Hide quoted text -
- Show quoted text -
Hi Dave,
Thanks for your reply.
Post by shivaraj
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
Loading...