2021/10/10 Microsoft Cloud Solutions 667 visit(s)
Ctelecoms
In this scenario
We will demonstrate how to block downloading files from Outlook on the web and only save them to OneDrive using -ConditionalAccessPolicy PowerShell parameter with set-OwaMailboxPolicy
Applied to online OneDrive and Sharepoint Online
The ConditionalAccessPolicy parameter specifies the Outlook on the Web Policy for limited access. For this feature to work properly, you also need to configure a Conditional Access policy in the Azure Active Directory Portal.
Note: When you enable a Conditional Access policy, users will no longer be able to access the light version of Outlook on the web. An error message will direct them to use the default premium experience.
Steps
Connect to PowerShell online management shell for exchange
Install-Module -Name ExchangeOnlineManagement
#Installing the PowerShell module
Update-Module -Name ExchangeOnlineManagement
#Update to the latest Version
Connect-ExchangeOnline
# connect to exchange online
Get-OwaMailboxPolicy | Fl -Property ident*
Set-OwaMailboxPolicy -Identity OwaMailboxPolicy-Default -ConditionalAccessPolicy ReadOnly Get-OwaMailboxPolicy | select-object ConditionalAccess*
First get the OWA mailbox policy and check it is name:
Set-OwaMailboxPolicy -Identity OwaMailboxPolicy-Default -ConditionalAccessPolicy ReadOnly
Then get the configuration
Get-OwaMailboxPolicy | select-object ConditionalAccess*
Crate conditional access policy now and choose the group you want
And choose office 365exhange online
Note: I have added sharepoint also cause I ll create the same restrictions for OneDrive in a later post
Use app enforced restriction
Now I sent to the user who isnt member of the blocked group in azure conditional access
He supposed to be able to download
Confirm it is working fine
Remove-OwaMailboxPolicy -Identity name
Conditional Access in Outlook on the web for Exchange Online - Microsoft Tech Community
Set-OwaMailboxPolicy (ExchangePowerShell) | Microsoft Docs
Session controls in Conditional Access policy - Azure Active Directory | Microsoft Docs