Help!

How do I retrive User permissions for a Mailbox?

 
  

Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Program Add-Ins RSS
Next:  Text in Text-formatted cells changes to ### after..  
Author Message
Maximilian"
External


Since: Jul 30, 2009
Posts: 1



PostPosted: Thu Jul 30, 2009 6:32 am    Post subject: How do I retrive User permissions for a Mailbox?
Archived from groups: microsoft>public>outlook>program_addins (more info?)

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.
Back to top
Ken Slovak - [MVP - Outlo
External


Since: Oct 17, 2003
Posts: 3355



PostPosted: Thu Jul 30, 2009 9:56 am    Post subject: Re: How do I retrive User permissions for a Mailbox? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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"" <Maximilian"@discussions.microsoft.com> 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.
Back to top
Maximilian"
External


Since: Jul 30, 2009
Posts: 1



PostPosted: Thu Jul 30, 2009 11:51 pm    Post subject: Re: How do I retrive User permissions for a Mailbox? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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"" <Maximilian"@discussions.microsoft.com> 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.
>
>
Back to top
Ken Slovak - [MVP - Outlo
External


Since: Oct 17, 2003
Posts: 3355



PostPosted: Fri Jul 31, 2009 8:55 am    Post subject: Re: How do I retrive User permissions for a Mailbox? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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"" <Maximilian.TakeThisOut@discussions.microsoft.com> 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?
Back to top
Dmitry Streblechenko
External


Since: Nov 23, 2003
Posts: 1401



PostPosted: Sun Aug 09, 2009 9:03 am    Post subject: Re: How do I retrive User permissions for a Mailbox? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Maximilian"" <Maximilian"@discussions.microsoft.com> 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.
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Program Add-Ins All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum