Try also removing the MyBaseOptions
role, as it also contains the corresponding app-related cmdlets. Well, maybe don't remove it directly, as it will affect other functionalities as well, but replace it with a custom role that has the *-App
cmdlets removed.
Just to confirm whether this will actually help, can you run the following cmdlet:
- Via the user who you want to restrict, connect to Exchange Online PowerShell and run the following cmdlet:
Get-Command New-App
- Via an admin account, run the following:
Get-ManagementRole -Cmdlet New-App
The first cmdlet verifies whether the user has sufficient permissions to run the New-App
cmdlet, that is install Outlook add-ins. The second one lists all admin and user roles that have the New-App
cmdlet added, you need to make sure that none of these ends up assigned to the user(s).