none
Programatically Lookup Group Membership based on one's GAB "Alias" ? RRS feed

  • Question

  • I am wondering if there is a way to check to see if a member of a GAL, based upon their ALIAS, is a member of a specific group?

    For example:

    if my alias is "armetleeS"

    and group member = "archived" then answer = "yes" else "no"

    Thursday, October 23, 2014 11:23 AM

Answers

  • Hello,

    The AddressEntry class provides the GetExchangeUser method which returns an ExchangeUser object that represents the AddressEntry if the AddressEntry belongs to an Exchange AddressList object such as the Global Address List (GAL) and corresponds to an Exchange user. The ExchangeUser class provides the Alias property, a String representing the alias for the ExchangeUser.

    But the Outlook object model doesn't provide any methods for checking whether a particular exchange user is a member of a specific group. You can try to iterate over all distribution lists and find the user address/name there.

    Thursday, October 23, 2014 12:06 PM
  • On the Extended MAPI (C++ or Delphi) level, you can open the PR_EMS_AB_IS_MEMBER_OF_DL property as IMAPITable (IMailIuser::OpenProperty(PR_EMS_AB_IS_MEMBER_OF_DL, IID_IMAPITable, ...) to get a list of groups the particular GAL user belongs to.

    If  using Redemption (any language) is an option, its RDOAddressEntry object exposes the IsMemberOfDL collection.


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Thursday, October 23, 2014 1:46 PM

All replies

  • Hello,

    The AddressEntry class provides the GetExchangeUser method which returns an ExchangeUser object that represents the AddressEntry if the AddressEntry belongs to an Exchange AddressList object such as the Global Address List (GAL) and corresponds to an Exchange user. The ExchangeUser class provides the Alias property, a String representing the alias for the ExchangeUser.

    But the Outlook object model doesn't provide any methods for checking whether a particular exchange user is a member of a specific group. You can try to iterate over all distribution lists and find the user address/name there.

    Thursday, October 23, 2014 12:06 PM
  • On the Extended MAPI (C++ or Delphi) level, you can open the PR_EMS_AB_IS_MEMBER_OF_DL property as IMAPITable (IMailIuser::OpenProperty(PR_EMS_AB_IS_MEMBER_OF_DL, IID_IMAPITable, ...) to get a list of groups the particular GAL user belongs to.

    If  using Redemption (any language) is an option, its RDOAddressEntry object exposes the IsMemberOfDL collection.


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Thursday, October 23, 2014 1:46 PM