A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

How do I retrive User permissions for a Mailbox?



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old July 30th 09, 02:32 PM posted to microsoft.public.outlook.program_addins
Maximilian
external usenet poster
 
Posts: 1
Default How do I retrive User permissions for a Mailbox?

Hi,

Im using VSTO to build an add in for Outlook 2007.
The problem In my add in is that I need to know which permissions the users
has.
For example: I need to know if the user has permission to "Send As" and I
need to get this information runtime in code.
After spending more time I intended to learn this by searching I now hope
that someone here has an answer.
  #2  
Old July 30th 09, 02:56 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default How do I retrive User permissions for a Mailbox?

That's not directly exposed in the Outlook 2007 object model. You can use
the Folder.PropertyAccessor() object on these properties, both are PT_LONG
(int32) that are bit flag values:

PR_ACCESS "http://schemas.microsoft.com/mapi/proptag/0x0FF40003"
PR_ACCESS_LEVEL "http://schemas.microsoft.com/mapi/proptag/0x0FF70003"

The DASL property tags for the properties are what you'd supply to
PropertyAccessor().

You then have to interpret the bit flags.

The same properties are also available on individual items, and on Store the
PR_ACCESS_LEVEL property is available. The bit flags such as MAPI_MODIFY are
in the mapidefs.h header file that's in most of the Windows and Exchange
SDK's.

However, that won't tell you some properties such as SendAs or ReceiveAs
permissions. For those you'd need to query the server. For that you could
use an LDAP query, or WebDAV or Exchange Web Services or a cmdlet, depending
on what version of Exchange is being queried. For more on that sort of stuff
you need to post in an Exchange development group such as
microsoft.public.exchange.development.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Maximilian"" wrote in message
...
Hi,

Im using VSTO to build an add in for Outlook 2007.
The problem In my add in is that I need to know which permissions the
users
has.
For example: I need to know if the user has permission to "Send As" and I
need to get this information runtime in code.
After spending more time I intended to learn this by searching I now hope
that someone here has an answer.


  #3  
Old July 31st 09, 07:51 AM posted to microsoft.public.outlook.program_addins
Maximilian[_2_]
external usenet poster
 
Posts: 1
Default How do I retrive User permissions for a Mailbox?

Ok, but feels like thats something that should have been exposed in the
object model thou. The problem is that I started with reading (LDAP) from the
AD directly but couldn't access the properties of the exchange - only the
ordinary stuff so that why I thought that this would be accessible through
the outlook Object model.

Do you know of any example on how to obtain this data through LDAP?

"Ken Slovak - [MVP - Outlook]" wrote:

That's not directly exposed in the Outlook 2007 object model. You can use
the Folder.PropertyAccessor() object on these properties, both are PT_LONG
(int32) that are bit flag values:

PR_ACCESS "http://schemas.microsoft.com/mapi/proptag/0x0FF40003"
PR_ACCESS_LEVEL "http://schemas.microsoft.com/mapi/proptag/0x0FF70003"

The DASL property tags for the properties are what you'd supply to
PropertyAccessor().

You then have to interpret the bit flags.

The same properties are also available on individual items, and on Store the
PR_ACCESS_LEVEL property is available. The bit flags such as MAPI_MODIFY are
in the mapidefs.h header file that's in most of the Windows and Exchange
SDK's.

However, that won't tell you some properties such as SendAs or ReceiveAs
permissions. For those you'd need to query the server. For that you could
use an LDAP query, or WebDAV or Exchange Web Services or a cmdlet, depending
on what version of Exchange is being queried. For more on that sort of stuff
you need to post in an Exchange development group such as
microsoft.public.exchange.development.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Maximilian"" wrote in message
...
Hi,

Im using VSTO to build an add in for Outlook 2007.
The problem In my add in is that I need to know which permissions the
users
has.
For example: I need to know if the user has permission to "Send As" and I
need to get this information runtime in code.
After spending more time I intended to learn this by searching I now hope
that someone here has an answer.



  #4  
Old July 31st 09, 01:55 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default How do I retrive User permissions for a Mailbox?

The access properties are exposed that way, SendAs or ReceiveAs are purely
server side properties so they aren't in the object model. They mean nothing
in the case of a PST file for example, and only relate to Exchange.

There may be better ways than using LDAP, such as WebDAV or Exchange Web
services or a cmdlet, depending on what version of Exchange is being used. I
don't do that much with that sort of thing so that's why I suggested asking
about that in an Exchange development group.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Maximilian"" wrote in message
...
Ok, but feels like thats something that should have been exposed in the
object model thou. The problem is that I started with reading (LDAP) from
the
AD directly but couldn't access the properties of the exchange - only the
ordinary stuff so that why I thought that this would be accessible through
the outlook Object model.

Do you know of any example on how to obtain this data through LDAP?


  #5  
Old August 9th 09, 05:03 PM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default How do I retrive User permissions for a Mailbox?

On the MAPI level (C++ or Delphi), you can open the
PR_EMS_AB_PUBLIC_DELEGATES_BL_O and PR_EMS_AB_PUBLIC_DELEGATES properties as
IMAPITable objects. Redemption (url below) exposes these as
RDOAddressEntry.Delegates and RDOAddressEntry.IsDelegateFor collections -
http://www.dimastr.com/redemption/rd...dressentry.htm

Folder level access settings can be retrieved by opening the PR_ACL_TABLE
property as IExchangeModifyTable from the IMAPIFolder objeect
(IMAPIFolder::OpenProperty). Redemption exposes ACL through the
RDOFolder.ACL collection: http://www.dimastr.com/redemption/rdo/rdoacl.htm

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Maximilian"" wrote in message
...
Hi,

Im using VSTO to build an add in for Outlook 2007.
The problem In my add in is that I need to know which permissions the
users
has.
For example: I need to know if the user has permission to "Send As" and I
need to get this information runtime in code.
After spending more time I intended to learn this by searching I now hope
that someone here has an answer.



 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
View other contacts (Other mailbox) you have permissions or delege Sheri Outlook - Using Contacts 0 June 25th 08 06:18 PM
Delegation and Send on Behalf Permissions - Other users Mailbox Gus Whitehouse Outlook - General Queries 0 October 4th 07 02:50 AM
How can I configure calendar permissions for an additional mailbox? yoda_the_webmaster Outlook - General Queries 1 January 20th 07 12:47 PM
Can admin set mailbox permissions using CDO? [email protected] Outlook and VBA 2 September 25th 06 10:57 PM
Permissions - Mailbox Chris Briant Outlook - General Queries 0 July 9th 06 01:42 PM


All times are GMT +1. The time now is 10:44 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.