'Outlook VSTO - Allow specific AD group to see ribbon

How can I programmatically restrict the VSTO Add-in Ribbon visibility to a specific AD group only? Can this be controlled directly from the Ribbon XML itself? The plugin is distributed to entire org, but need the ribbon visibility to change by AD group



Solution 1:[1]

No, but your own code can easily perform the check and show/hide the ribbon using the getVisible callback specified for your ribbon.

Would be a good idea to perform that check asynchronously and cache the check result before the ribbon is requested by Outlook. If the check completes after the ribbon is returned, call RibbonUI.Invalidate(), which would case Outlook to invoke your getVisible callback again.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1