none
IRM Protection with Azure RMS RRS feed

  • Question

  • Hy everyone,

    till yesterday my company was using an internal RMS service. In such situation, inside the code of my Outlook Add-in, I set the IRM permission of an MailItem throught the Permission property

    MyEmail.Permission = OlPermission.olDoNotForward

    Now we switched to Azure AD RMS, and the above piece of code doesn't work.
    When the line is executed, Outlook pup-up a dialog which says "We were not able to find the Information Rights Management template".
    But if I go under "Permission" tab on the ribbon and then under "Permission" menu, I can apply the DNF protection without any problem.

    Do You have any suggestion?
    Saturday, April 9, 2016 4:15 PM

Answers

  • >>>Before switching RMS on the cloud, this line worked like a charm, but now, when it is executed, Outlook shows a pop-up which says

    “We are not able to find the Information Rights Management template. Please contact your administrator”

    and the code throws an exception which message is “Operation failed”.

    The strange thing is that through the  UI I can protect, but no via code.<<<

    According to your description, I think that this issue is not related to Outlook object model, I suggest that you could post your issue on MSDN for Azure Active Directory

    https://social.msdn.microsoft.com/Forums/azure/en-US/home?forum=WindowsAzureAD 

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. 

    Thanks for your understanding.
    Tuesday, April 12, 2016 5:58 AM

All replies

  • Hello Simone,

    Where did you get the MyEmail instance?

    Looks like Outlook is not aware of Azure AD RMS.

    The Permission property should be synchronized with the PermissionTemplateGuid property to accurately reflect the permission status of the MailItem. Setting the PermissionTemplateGuid property to a valid GUID also sets the Permission property to OlPermission.olPermissionTemplate. Try to check the PermissionTemplateGuid property value too. Is it set correctly?


    [custom.development]

    Saturday, April 9, 2016 4:54 PM
  • Hi,

    I get the MyEmail instance when the users click on a button on the ribbon bar.

    When I try to print the value of "PermissionTemplateGuid" property, I get an exception "The operation failed".

    Even if I set that property to "" (the empty string, because I wish to use DNF protection), I get the same error.

    Thanks

    Saturday, April 9, 2016 5:33 PM
  • I'd suggest checking property values right after you set RMS properties in Outlook manually. Are they set correctly?

    [custom.development]

    Saturday, April 9, 2016 5:52 PM
  • I can't check the values of properites (i.e. PermissionTemplateGuid) after setting the RMS permission through the line

    MyEmail.Permission = OlPermission.olDoNotForward

    because the system throw an exception, and the exception says "The operation failed".

    It is strange, because Outlook see the RMS configuration and using the built-in menu I can use the "Don Not Forward" Protection.

    Thanks

    Saturday, April 9, 2016 6:59 PM
  • No, I meant to adjust RMS properties via Outlook UI (not code) and then check out OOM properties.

    [custom.development]

    Sunday, April 10, 2016 5:52 AM
  • I set "Do Not Forward" via Outlook UI, and the I checked the Permission property and its value is "OlDoNotForward".

    If I try to check the value of PermissionTemplateGuid I got an exception.

    Thanks

    Sunday, April 10, 2016 2:05 PM
  • >>>I set "Do Not Forward" via Outlook UI, and the I checked the Permission property and its value is "OlDoNotForward".

    If I try to check the value of PermissionTemplateGuid I got an exception.<<<

    According to your description, I have made a sample to try to reproduce this issue, unfortunately, I can't.
    So I suggest that you could provide more information about your issue, for example sample code, screenshot etc., that will help us reproduce and resolve it.

    Thanks for your understanding.
    Monday, April 11, 2016 7:29 AM
  • Hi,

    as I said in the title, I have a problem when I try to protect an object of type MailItem using the "Do Not Forward" protection via c# code inside an Outlook Add-in.

    Few days ago, I switched the RMS service on the cloud. After configuring the machine to use RMS on the cloud, I tried to protect an e-Mail (through Outlook UI, under permission menu) and all its done: the e-Mail is protected.

    Inside the code of my Add-in, when the user press a button on the ribbon bar, I programmatically set the protection of the e-Mail as "Do not forward" using the following piece of code:

    eMail.Permission = Microsoft.Office.Interop.Outlook.OlPermission.olDoNotForward;

    Before switching RMS on the cloud, this line worked like a charm, but now, when it is executed, Outlook shows a pop-up which says

    “We are not able to find the Information Rights Management template. Please contact your administrator”

    and the code throws an exception which message is “Operation failed”.

    The strange thing is that through the  UI I can protect, but no via code.

    Thanks


    Monday, April 11, 2016 9:07 PM
  • >>>Before switching RMS on the cloud, this line worked like a charm, but now, when it is executed, Outlook shows a pop-up which says

    “We are not able to find the Information Rights Management template. Please contact your administrator”

    and the code throws an exception which message is “Operation failed”.

    The strange thing is that through the  UI I can protect, but no via code.<<<

    According to your description, I think that this issue is not related to Outlook object model, I suggest that you could post your issue on MSDN for Azure Active Directory

    https://social.msdn.microsoft.com/Forums/azure/en-US/home?forum=WindowsAzureAD 

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. 

    Thanks for your understanding.
    Tuesday, April 12, 2016 5:58 AM