none
UserDefinedProperties Permission denied RRS feed

  • Question

  • I've got some code in my third party application that creates a user defined property on an Outlook Calendar folder and also sets that property in individual items.

    This all works fine on my local calendar

    If I try to do it on a shared office calendar I get permission denied

    This is fair enough but how do I check the permission (and which permission) of the user before I attempt to create the property so that I can avoid the inevitable error and put an appropriate message on screen

    Thanks

     
    Tuesday, October 1, 2019 11:02 AM

Answers

  • Thanks Dmitry

    To answer my own question you need to check these two DASL properties using the Property Assessor of the item

    "http://schemas.microsoft.com/mapi/proptag/0x0FF40003" PR_ACCESShttps://docs.microsoft.com/en-us/previous-versions/office/developer/office-2007/cc979218(v=office.12)?

    http://schemas.microsoft.com/mapi/proptag/0x0FF70003
    PR_ACCESS_LEVEL   
    https://docs.microsoft.com/en-us/office/client-developer/outlook/mapi/pidtagaccesslevel-canonical-property

    • Marked as answer by Minieggs1999 Thursday, October 3, 2019 10:04 AM
    Thursday, October 3, 2019 10:04 AM

All replies

  • Attempting to create the property is a good enough test. Why not simply handle the exception add display the prompt? Named property creation can fails for other reasons besides inadequate access rights.

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

    Wednesday, October 2, 2019 4:41 PM
  • Thanks Dmitry

    To answer my own question you need to check these two DASL properties using the Property Assessor of the item

    "http://schemas.microsoft.com/mapi/proptag/0x0FF40003" PR_ACCESShttps://docs.microsoft.com/en-us/previous-versions/office/developer/office-2007/cc979218(v=office.12)?

    http://schemas.microsoft.com/mapi/proptag/0x0FF70003
    PR_ACCESS_LEVEL   
    https://docs.microsoft.com/en-us/office/client-developer/outlook/mapi/pidtagaccesslevel-canonical-property

    • Marked as answer by Minieggs1999 Thursday, October 3, 2019 10:04 AM
    Thursday, October 3, 2019 10:04 AM
  • I'm still struggling with this a bit

    Via the Outlook user interface I cannot seem to (get another user to) set the permissions on their calendar to allow me write access

    If they right click on Calendar under My Calendars > Properties > Permissions > set to Can Edit or Delegate

    When I query the  PR_ACCESS_LEVEL  it still returns 18 which means I don't have write access

    If I get them to go to Account Settings > Delegate >Delegate Access and add me

    It still shows PR_ACCESS_LEVEL 18 and I need it to be an odd number because MAPI_ACCESS_MODIFY is 1

    Is it possible for a user to give another user modify access ?

    Note I CAN add/modify/remove appointments I create in their calendar but I cannot add a User Defined Property to their folder

    Thanks

    Monday, October 21, 2019 8:53 AM
  • Again, why not simply try top create the property and catch the exception?

    Also, do you really need to add the property on the folder level (whcih requires to create/modify a hidden folder item)? Or would the item level suffice?


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

    Monday, October 21, 2019 2:43 PM
  • Yes of course I can attempt to create the property and catch the error but I still don't know what to tell the user to do to allow this to happen

    If I am going create an integration that relies/can create a user defined property then I have to be able to guarantee I can do it

    Item level would suffice but does it not have to exist at folder level for that to work ?

    I am only exploring this idea because StoreID/EntryID are so large to be stored in the database so I can get back to the appointment I created if I need to update it 

    Monday, October 21, 2019 2:51 PM