none
How to find owner of a delegated mail in appointment item/meeting item object Or owner of shared calendar via calendar folder object? RRS feed

  • Question

  • If A delegates his meeting B. Then B will receive both B's(his own) meeting and A's Meeting to his inbox. I have situation to store A's meeting in a table and B's meeting in a different table.  I am not seeing anything in AppointmentItem and MeetingItem object to fulfill my need.

    AppointmentItem.GetOrganizer object will give the result who has sent the meeting request to A or B and not exactly give the answer the corresponding meeting belongs to A or B?

    Hope you have understand my question?

     


    http://www.selvaonline.com - Live a Happy & Balanced Life






    Thursday, February 28, 2013 1:27 PM

Answers

  • Hi Selva,

    What version of Outlook are you using?  When I do the following it all works:

    1. Create a User A
    2. Create a User B
    3. Make User B a delegate of User A.  Make sure to include for User B to receive meeting requests for User A
    4. Send a meeting to User A
    5. Use my code against the meeting item in my Inbox
    6. Get the recipient details of User A using the steps I provided in my second post above.  Note: You should call MeetingItem.GetAssociatedAppointment

    Dave


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members.
    • Marked as answer by SelvaOnline Wednesday, March 13, 2013 4:07 PM
    • Unmarked as answer by SelvaOnline Wednesday, March 13, 2013 4:09 PM
    • Marked as answer by SelvaOnline Wednesday, March 13, 2013 4:09 PM
    Wednesday, March 13, 2013 1:09 PM

All replies

  • Hi SelvaOnline,

    Thank you for posting the MSDN Forum.

    From your description, I guess you are searching for AppointmentItem.GetOrganizer Method.

    Hope it helps. If there's still anything unclear, please feel free to let me know.

    Best regards,


    Quist Zhang [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, March 1, 2013 9:44 AM
    Moderator
  • My Detailed Question is below


    If A delegates his meeting B. Then B will receive both B's(his own) meeting and A's Meeting to his inbox. I have situation to store A's meeting in a table and B's meeting in a different table.  I am not seeing anything in AppointmentItem and MeetingItem object to fulfill my need.

    AppointmentItem.GetOrganizer object will give the result who has sent the meeting request to A or B and not exactly give the answer the corresponding meeting belongs to A or B?

    Hope you have understand my question?


    http://www.selvaonline.com - Live a Happy & Balanced Life

    Friday, March 1, 2013 4:28 PM
  • If A delegates his meeting B. Then B will receive both B's(his own) meeting and A's Meeting to his inbox. I have situation to store A's meeting in a table and B's meeting in a different table.  I am not seeing anything in AppointmentItem and MeetingItem object to fulfill my need.

    AppointmentItem.GetOrganizer object will give the result who has sent the meeting request to A or B and not exactly give the answer the corresponding meeting belongs to A or B?


    http://www.selvaonline.com - Live a Happy & Balanced Life

    Friday, March 1, 2013 4:30 PM
  • Hi SelvaOnline,

    Thank you for your last reply.

    I'll consult your issue with my colleague. You'll be informed if there's any update.

    Thank you for your patience and understanding.

    Best regards,


    Quist Zhang [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, March 4, 2013 9:28 AM
    Moderator
  • Hi Quist Zhang,

    Any update on my question.Thanks a lot for your help in advance !

    Regards,

    Selva


    http://www.selvaonline.com - Live a Happy & Balanced Life

    Monday, March 4, 2013 4:55 PM
  • Hi Quist Zhang,

    Any update on my query?


    Regards,

    Selva


    http://www.selvaonline.com - Live a Happy & Balanced Life

    Tuesday, March 5, 2013 2:49 PM
  • Could you rephrase your question and issue please?  I'm having trouble understanding it.  What information from the appointments do you want to store?  What information are you not able to get?

    Eric Legault MVP (Outlook)
    About me...
    Outlook Appins: Store Social Media fields in your Outlook Contacts!

    Tuesday, March 5, 2013 3:47 PM
    Moderator
  • Hi Eric,

    If i am getting some delegated meeting request to my inbox, i am not able to get who is the owner of the meeting through meeting item or appointment item objects.

    A : Meeting Organizer

    B: User (Who delegate his calnedar to me)

    C : I am

    Here A Sent the meeting request to B. B has already delegated his meetings to me(C)and C (I am) getting the meeting request.

    Now I want to find who is B from the meeting item which has received to my inbox as a delegate meeting request.

    Hope you understand my question.

    Regards,

    Selva


    http://www.selvaonline.com - Live a Happy & Balanced Life




    Tuesday, March 5, 2013 9:34 PM
  • Hi,

    I am not sure I truly understand your question but based on the title I suspect that you are trying to access an appointment item or a meeting item on a shared calendar and trying to map that back to the owner of the appointment / meeting item.  If that is indeed your question you can do the following to figure out the shared calendar owner:

    1. Get the parent item (should be a folder) of the appointment / meeting item

    2. Retrieve the StoreId property of the parent item.

    3. Convert the HexString StoreId to readable string.  The StoreId property is a hex string that will contain, among other things, the Exchange Legacy DN (e.g. /o=First Organization/ou=First Administrative Group/cn=Recipients/cn=John Doe)  of the owner of the shared calendar.

    4. Find the Exchange Legacy DN within the string.

    5. Map that back to a recipient within your organization

    Hope that helps,

    Dave


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members.
    Friday, March 8, 2013 3:16 PM
  • Hi Dave,

    I am not getting owner name in the below recipients column and i am getting my name in the receipient coulmn.

    Convert the HexString StoreId to readable string.  The StoreId property is a hex string that will contain, among other things, the Exchange Legacy DN (e.g. /o=First Organization/ou=First Administrative Group/cn=Recipients/cn=Selvakumar Murugesan)  of the owner of the shared calendar.

    Its look like microsoft doesn't exposed any object or property to get the owner of the shared calendar when trying to access an appointment item or a meeting item on a shared calendar and trying to map that back to the owner of the appointment / meeting item

    Kindly advice.

    Regards,

    Selva


    http://www.selvaonline.com - Live a Happy & Balanced Life



    Friday, March 8, 2013 8:19 PM
  • I am trying to access an appointment item or a meeting item on a shared calendar and trying to map that back to the owner of the appointment / meeting item.

    I was trying the following method and no luck

    1. Get the parent item (should be a folder) of the appointment / meeting item

    2. Retrieve the StoreId property of the parent item.

    3. Convert the HexString StoreId to readable string.  The StoreId property is a hex string that will contain, among other things, the Exchange Legacy DN (e.g. /o=First Organization/ou=First Administrative Group/cn=Recipients/cn=Selvakumar Murugesan).I am not getting shared owner's name in the Recipients column and instead i am getting my name there..

    Note : Please don't merge this question to any one of the existing questions. Nothing is working in practical. I need answer for this question.


    http://www.selvaonline.com - Live a Happy & Balanced Life


    Friday, March 8, 2013 9:09 PM
  • Hi Selva,

    It looks like my steps above were slightly incorrect.  Let me change them a bit since you are dealing with the meeting request sitting in the delegate's Inbox.

    1. Get the associated appointment / meeting by using the method MeetingItem.GetAssociatedAppointment
    2. Get the parent item (should be a folder) of the appointment / meeting item
    3. Retrieve the StoreId property of the parent item.
    4. Convert the HexString "StoreId" to readable string.  The StoreId property is a hex string that will contain, among other things, the Exchange Legacy DN (e.g. /o=First Organization/ou=First Administrative Group/cn=Recipients/cn=User B)  of the owner of the shared calendar.
    5. Find the Exchange Legacy DN within the string.
    6. Map that back to a recipient within your organization

    The Outlook object model does not expose a first class property to map the Exchange Legacy DN back to the owner of the appointment / meeting. The easiest way to do this is to use to create a recipient and use the Recipient.Resolve method to resolve the recipient to a user within your organization.  Here is an example of that using VBA:

    Sub ResolveRecipient()
        Dim recip As Recipient
       
        Set recip = Application.Session.CreateRecipient("/o=First Organization/ou=First Administrative Group/cn=Recipients/cn=User B")
        recip.Resolve
       
        If (recip.Resolve) Then
            MsgBox "Success!"
        End If
    End Sub

    Dave


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members.

    Monday, March 11, 2013 7:58 PM
  • Hi Dave, I am interested to get User A who delegates the meeting to me. The above sample code is working but it always giving my name as cn Recipients when i open a delegated meeting (User A delegates to me and i am User B).

    I am getting User A details when i open the meeting request in calendar view with Calendar A's shared calendar. But when i receive the meeting to my inbox and when i open the meeting i am not able to get User A's details and i am getting my detail as recipient.

    Regards,
    Selva


    http://www.selvaonline.com - Live a Happy & Balanced Life


    • Edited by SelvaOnline Tuesday, March 12, 2013 7:26 PM
    Tuesday, March 12, 2013 4:28 PM
  • Hi Selva,

    What version of Outlook are you using?  When I do the following it all works:

    1. Create a User A
    2. Create a User B
    3. Make User B a delegate of User A.  Make sure to include for User B to receive meeting requests for User A
    4. Send a meeting to User A
    5. Use my code against the meeting item in my Inbox
    6. Get the recipient details of User A using the steps I provided in my second post above.  Note: You should call MeetingItem.GetAssociatedAppointment

    Dave


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members.
    • Marked as answer by SelvaOnline Wednesday, March 13, 2013 4:07 PM
    • Unmarked as answer by SelvaOnline Wednesday, March 13, 2013 4:09 PM
    • Marked as answer by SelvaOnline Wednesday, March 13, 2013 4:09 PM
    Wednesday, March 13, 2013 1:09 PM
  • Thanks a million Dave :) It works great. Appreciating your great help !!

    http://www.selvaonline.com - Live a Happy & Balanced Life

    Wednesday, March 13, 2013 4:09 PM
  • Dave,

    I have one more question on this flow.

    If delegate just have Reviewer (Can read items),Author (Can read and create items) access means MeetingItem.GetAssociatedAppointment is coming as null value. So i couldn't proceed further in finding of the meeting owner.

    So the above logic is only working if the delegate has Editor access. What needs to be done to get the meeting owner details if delegate has Reviewer or Author access?

    Kindly advice. Thanks  a lot in advance for your help.

    Regards,

    Selva


    http://www.selvaonline.com - Live a Happy & Balanced Life



    Friday, March 22, 2013 5:31 PM
  • The problem is that if your delegate mailboxes are cached, they are cached in the primary mailbox store outside of the IPM tree (you can see them these folders using OutlookSpy), so no wonder the store entry id corresponds to the primary mailbox user.

    The only workaround is to open the parent folder, then open its parent folder and look at its properties to figure out who the owner is - it must be set as a property (don't remember off the top of my head which one).

    In OutlookSpy, click IMsgStore button, then "Open Root Container", go to the GetHierarchyTable. I think the folder name is "Shared Data".


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

    Friday, March 22, 2013 6:05 PM
  • It would be great if you confirm the property in Parent of Parent folder. I am still getting my name when i look at parent of parent folder from your hint.I am interested to see the owner of the meeting item.

    Actually above Dave's idea is working very well except non-editor access of delegates.


    http://www.selvaonline.com - Live a Happy & Balanced Life


    Friday, March 22, 2013 6:39 PM
  • Which property are you looking at? All the entry ids will still correspond to the primary mailbox.

    Did you look at the cached delegate folder with OutlookSpy or MFCMAPI? I am away from my primary machine right now and I don't have access at this moment to a machine with a delegate mailbox added to a profile


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

    Friday, March 22, 2013 7:25 PM
  • Hi Dave,

    Good Morning. I have one more query related to Delegates and raised as another thread in MSDN Forum. I will be very thankful if you can help me on this issue.

    http://social.msdn.microsoft.com/Forums/en-US/outlookdev/thread/41237094-1256-42be-90a5-7d9fca4329d5

    Regards,
    Selva


    http://www.selvaonline.com - Live a Happy & Balanced Life

    Wednesday, May 1, 2013 2:50 PM