0

From within the context of an Outlook COM add-in, what is the best way to check if the current user has Send as permissions to another account?

I'm aware of the Redemption RDOAddressEntry.Delegates (PR_EMS_AB_PUBLIC_DELEGATES) and RDOAddressEntry.IsDelegateFor (PR_EMS_AB_PUBLIC_DELEGATES_BL_O) properties which correspond to the Send on behalf of permissions.

I also found this question How do I query effective permissions on an Active Directory Object? hinting that is should be possible to extract the Send as permissions from AD. But perhaps there is an easier way?

SoerenH
  • 3
  • 1

1 Answers1

0

Those are you only choices - either Extended MAPI (directly in C++ or Delphi or indirectly through Redemption) or the AD (which can be a PITA if your code is not running in the context of the domain user).

Dmitry Streblechenko
  • 62,942
  • 4
  • 53
  • 78
  • Hi Dmitry. Thanks for chiming in on this one. How should it be done with extended MAPI? It seems that only "Send on behalf of" properties are available in MAPI - not "Send as"? – SoerenH Aug 15 '21 at 04:59
  • That information can be retrieved from the autodidact XML - looks for the delegate mailboxes. – Dmitry Streblechenko Aug 15 '21 at 15:26
  • Ok, sounds promising - Where can I find this "autodidact XML" ? – SoerenH Aug 16 '21 at 07:31
  • Sorry, I meant "autodiscover XML" - look at `Application.Session.AutodiscoverXml` – Dmitry Streblechenko Aug 16 '21 at 13:07
  • Just to give a quick update: It turns out that mailboxes with _read_ access can be extracted from AutodiscoverXML. Unfortunately, in our particular case it is possible for an user to have read access but no "send as" permission. But even Outlook seems to be unable to check this, since it is possible to send an e-mail with a from address without "send as" permissions (but of course the mail bounces when it hits Exchange). – SoerenH Sep 01 '21 at 11:29