How do I retrive User permissions for a Mailbox?

Status
Not open for further replies.
M

Maximilian

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.
 
K

Ken Slovak - [MVP - Outlook]

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.

"Maximilian"" <Maximilian"> wrote in message

news:0B492551-997F-42D5-9444-75B2A77A80A1@microsoft.com...
> 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.
 
M

Maximilian

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?
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.

> >

>

> "Maximilian"" <Maximilian"> wrote in message
> news:0B492551-997F-42D5-9444-75B2A77A80A1@microsoft.com...
> > 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.


>
 
K

Ken Slovak - [MVP - Outlook]

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.

"Maximilian"" <Maximilian> wrote in message

news:952B321D-815D-426A-B795-BD27DB2541AF@microsoft.com...
> 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?
 
D

Dmitry Streblechenko

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/rdo/rdoaddressentry.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)

-

"Maximilian"" <Maximilian"> wrote in message

news:0B492551-997F-42D5-9444-75B2A77A80A1@microsoft.com...
> 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.
 
Status
Not open for further replies.
Thread starter Similar threads Forum Replies Date
P How to retrive FID and MID from UniqueID Exchange Server Administration 0
V How to retrive email ids of all senders from outlook without opening each message Using Outlook 1
icacream Enter your user name and password for the following server. Using Outlook 5
B User defined field for messages with 'me' in the [To], [Cc] line Using Outlook 0
S User Defined Fields adding new value (2) Using Outlook 0
R Creating a user defined function Outlook VBA and Custom Forms 3
M Compile error: User-defined type not defined Outlook VBA and Custom Forms 0
M How to export Voting Results with user names and their responses Outlook VBA and Custom Forms 13
M vCard does not have user-defined fields from my custom contact form (365) Using Outlook 1
C Outlook 2016 Conditional Format for User Defined Field Using Outlook 1
G <mailto:user@domain.com<mailto:user@domain.com<mailto:user@domain.com>>> Using Outlook 4
F MAPI, User Defined Fields and perspective after 20 years Outlook VBA and Custom Forms 0
B Outlook Business Contact Manager with SQL to Excel, User Defined Fields in BCM don't sync in SQL. Can I use VBA code to copy 1 field to another? BCM (Business Contact Manager) 0
A Created a new user account and the local account cannot see email Using Outlook 3
N How to set automatically the default or user defined Quickstyle Templates by Answer in Outlook Using Outlook 1
S Custom Form, copy user field data to message body Outlook VBA and Custom Forms 12
Daniel Schunk User-defined form arrives empty at the recipient Using Outlook 3
C Changed By field not displaying individual user's name in O365 Shared Mailbox Using Outlook 9
M other user's mailbox won't open, forms disappeared Using Outlook 42
S Custom user fields in received messages Outlook VBA and Custom Forms 1
T Have Outlook 2016 suggest email address auto complete entries directly from the user's contacts list Using Outlook 10
T Have Outlook 2016 suggest email address auto complete entries directly from the user's contacts list Using Outlook 0
Potty Ash MS Outlook 2010 custom form - validation or formula to request user to check a checkbox Outlook VBA and Custom Forms 16
P Change PC User Directory & iPhone Sync Using Outlook 2
J Assess content of User Defined Field in Rule Using Outlook 3
M How can I determine which user read an email Exchange Server Administration 4
J reinstalling Outlook 2007 asking for user name & password Using Outlook 14
R Prompt asking the user to send email to folder as *.msg file Outlook VBA and Custom Forms 1
J Outlook - 2013 - Error msg when copying folders from Online Archives to another user's mailbox Using Outlook 0
N Select a folder in a user account Outlook VBA and Custom Forms 2
S Outlook User defined date field (UDF) not syncing Using Outlook 2
A How to enable outlook room finder (outlook connector (mapi)) user ? Using Outlook 3
M Multiple User Defined Fields that can be added, changed, updated using VBA and user form Outlook VBA and Custom Forms 0
R User Defined Fields adding new value Using Outlook 3
B ActiveExplorer return NULL on new Window user login and running Outlook first time Using Outlook 1
S how to set user properties to a newly created appointment Outlook VBA and Custom Forms 12
S VBA with User Defined fields Outlook VBA and Custom Forms 9
D Unable to Send On Behalf of Another User Exchange Server Administration 0
M Exchange 2013 On premise set MessageRateLimit for User has no effect. Exchange Server Administration 0
A Block user to send emails to specific set of email ids Using Outlook 1
A UID field in iCal files - unique per-event or per-user or both? Using Outlook 2
G how can Apply User-defined Field to all Sub Folder and Other Using Outlook 14
C Custom Application Form send Email to Another User Using Outlook 1
B Auto Save of Attachments from Multiple Emails and forward attachments to user group Outlook VBA and Custom Forms 1
C Where are BCM User Customizations located? BCM (Business Contact Manager) 9
Mark Foley Outlook prompts for IMAP user/PW when domain PW changes Using Outlook 0
M Map Outlook user defined fields onto a Sharepoint list ??? Outlook VBA and Custom Forms 1
O Promoting Outlook 2003 User Templates Using Outlook 1
L A realtime Outlook user inbox count Using Outlook 5
I shared mailbox - can i create a rule (vba) for every user? Outlook VBA and Custom Forms 1
Similar threads


















































Top