<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>block unmanaged devices conditional access Archives - the Sysadmin Channel</title>
	<atom:link href="https://thesysadminchannel.com/tag/block-unmanaged-devices-conditional-access/feed/" rel="self" type="application/rss+xml" />
	<link>https://thesysadminchannel.com/tag/block-unmanaged-devices-conditional-access/</link>
	<description>Documenting My Life as a System Administrator</description>
	<lastBuildDate>Mon, 25 Sep 2023 02:21:20 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>
<site xmlns="com-wordpress:feed-additions:1">144174110</site>	<item>
		<title>Block Unmanaged Devices Using Conditional Access</title>
		<link>https://thesysadminchannel.com/block-unmanaged-devices-using-conditional-access/</link>
					<comments>https://thesysadminchannel.com/block-unmanaged-devices-using-conditional-access/#respond</comments>
		
		<dc:creator><![CDATA[Paul Contreras]]></dc:creator>
		<pubDate>Mon, 25 Sep 2023 02:21:20 +0000</pubDate>
				<category><![CDATA[Azure]]></category>
		<category><![CDATA[Office365]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[block unmanaged devices conditional access]]></category>
		<category><![CDATA[conditional access block sharepoint but not teams]]></category>
		<category><![CDATA[restrict m365 apps in browser]]></category>
		<guid isPermaLink="false">https://thesysadminchannel.com/?p=4839</guid>

					<description><![CDATA[<p>For most, the days of working off an entire on-premises environment where you have to connect to VPN in order to access email or your files is long gone. The world has shifted to hybrid or cloud only environments and&#8230; <a href="https://thesysadminchannel.com/block-unmanaged-devices-using-conditional-access/" class="more-link">Continue Reading <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a href="https://thesysadminchannel.com/block-unmanaged-devices-using-conditional-access/">Block Unmanaged Devices Using Conditional Access</a> appeared first on <a href="https://thesysadminchannel.com">the Sysadmin Channel</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>For most, the days of working off an entire on-premises environment where you have to connect to VPN in order to access email or your files is long gone.  The world has shifted to hybrid or cloud only environments and with that, it&#8217;s important to ensure your data is only accessible to devices that only you authorize. Today we are going to go over the methods on how to limit access when using a browser as well as the methods to <strong>block unmanaged devices using conditional access</strong>.</p>
<div id="tableofcontents">
<h2>Table Of Contents</h2>
<ul>
<li><a href="#requirements">Requirements</a></li>
<li><a href="#unmanageddevice">What Classifies an Unmanaged Device</a></li>
<li><a href="#limitaccess">Limit Browser Access on Unmanaged Devices for M365 Apps</a></li>
<ul>
<li><a href="#limitspo">Limited Browser Access for SharePoint Online</a></li>
<ul>
<li><a href="#limitspopersite">Apply on a Per-Site Basis</a></li>
<li><a href="#limitspotenant">Apply at the Tenant Level</a></li>
</ul>
<li><a href="#limitexo">Limited Browser Access for Exchange Online</a></li>
<ul>
<li><a href="#limitexopermailbox">Apply on a Per-Mailbox Basis</a></li>
<li><a href="#limitexotenant">Apply at the Tenant Level</a></li>
</ul>
</ul>
<li><a href="#blockaccess">Block Unmanaged Devices Using Conditional Access</a></li>
<li><a href="#restrictaccess">Restrict Browser Access on Unmanaged Devices Using Conditional Access</a></li>
<li><a href="#extensions">Incognito Mode and Browser Extensions</a></li>
<li><a href="#conclusion">Conclusion</a></li>
</ul>
</div>
<p>&nbsp;</p>
<div id="requirements" style="scroll-margin-top: 10px;"></div>
<h2>Requirements</h2>
<p>Before we go into the details on how to set this up, we first need to ensure that we have everything in place so everything works as expected. Here&#8217;s what is needed.</p>
<ul>
<li>Azure AD P1 or P2 license for conditional access</li>
<li>Security Administrator, Conditional Access Administrator or Global Administrator</li>
<li>SharePoint Administrator or Global Administrator</li>
<li>Exchange Administrator or Global Administrator</li>
<li>Microsoft.Online.SharePoint.PowerShell PowerShell Module</li>
<li>ExchangeOnlineManagement PowerShell Module</li>
</ul>
<p>&nbsp;</p>
<p>To touch a bit on these requirements, we need to ensure we have an Azure AD P1 or P2 license so we can have access to use conditional access policies.  This is going to be the foundation of what we&#8217;re going to use to either limit or block unmanaged devices from accessing anything in the cloud.  Also as of today, Security Administrator, Conditional Access Administrator or Global Administrator are the only roles that are able to modify CA policies. So we will need at least one of those.<br />
&nbsp;</p>
<p>Exchange Administrator and SharePoint Administrators are needed to be able to set the respective platform policies to limited access.  A bit more on that later.</p>
<div id="unmanageddevice" style="scroll-margin-top: 10px;"></div>
<h2>What Classifies as an Unmanaged Device</h2>
<p>An unmanaged device is typically a device that is not issued by your organization.  It is often synonymous with BYOD (Bring Your Own Device) and can be anything from a personal computer or phone to a machine that you use to access emails while at grandma&#8217;s house.  The point here is that it doesn&#8217;t have any policies and it is not properly governed by the IT department.<br />
&nbsp;</p>
<div id="limitaccess" style="scroll-margin-top: 10px;"></div>
<h2>Limit Browser Access on Unmanaged Devices for M365 Apps</h2>
<p>If you don&#8217;t want to put a full stop on users accessing M365 resources, you do have the ability to limit what they can do while signed in from an unmanaged device.  Simply put, we can enforce policies so users can still sign in using the web only methods, however, they will be blocked from downloading anything to the local machine.<br />
&nbsp;</p>
<p>For most, this is a great happy medium because it still keeps your data secure to a certain extent and users can access their documents if they don&#8217;t have their company issued device around.<br />
&nbsp;</p>
<p>This is in fact a two-step process so we&#8217;ll target SharePoint/OneDrive and Exchange Online now.  Then we will finish it off with the CA Policies.</p>
<div id="limitspo" style="scroll-margin-top: 10px;"></div>
<h2>Limited Browser Access for SharePoint Online</h2>
<p>If you want to take this in incremental steps you definitely can.  Being able to set limited access on specific sites is supported so it&#8217;s definitely recommended you take that approach first. In my opinion it will be a good test to set limited access on a few SharePoint sites as well as a few OneDrive sites.<br />
&nbsp;</p>
<p>Let&#8217;s connect to SharePoint Online using the <a href="https://www.powershellgallery.com/packages/Microsoft.Online.SharePoint.PowerShell/" rel="noopener" target="_blank">Microsoft.Online.SharePoint.PowerShell</a> PowerShell Module.</p>
<pre class="brush: powershell; title: ; notranslate">
Import-Module Microsoft.Online.SharePoint.PowerShell -WarningAction SilentlyContinue
$adminURL = 'https://&lt;tenantname&gt;-admin.sharepoint.com'
Connect-SPOService -Url $adminURL -WarningAction SilentlyContinue
</pre>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2023/09/Connect-SharePoint-Online.png" target="_blank" rel="noopener"><img fetchpriority="high" decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2023/09/Connect-SharePoint-Online.png" alt="Connect-SharePoint Online" width="861" height="215" class="aligncenter size-full wp-image-4848" srcset="https://thesysadminchannel.com/wp-content/uploads/2023/09/Connect-SharePoint-Online.png?v=1695425407 861w, https://thesysadminchannel.com/wp-content/uploads/2023/09/Connect-SharePoint-Online-768x192.png?v=1695425407 768w" sizes="(max-width: 861px) 100vw, 861px" /></a><br />
&nbsp;</p>
<div id="limitspopersite" style="scroll-margin-top: 10px;"></div>
<h4>Apply on a Per-Site Basis</h4>
<p>Next, let&#8217;s take a look at the conditional access property within the <strong><em>Get-SPOSite</em></strong> cmdlet.  This is what we&#8217;ll use to be able to limit access on specific SharePoint (or OneDrive) sites before we deploy this on the tenant level. By default, this should be set to allow full access.  Meaning anyone can access this SharePoint site from anywhere and there wouldn&#8217;t be any restrictions in place.</p>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2023/09/Get-SPO-Site-PowerShell.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2023/09/Get-SPO-Site-PowerShell.png" alt="Get SPOSite PowerShell" width="860" height="265" class="aligncenter size-full wp-image-4851" srcset="https://thesysadminchannel.com/wp-content/uploads/2023/09/Get-SPO-Site-PowerShell.png?v=1695486802 860w, https://thesysadminchannel.com/wp-content/uploads/2023/09/Get-SPO-Site-PowerShell-768x237.png?v=1695486802 768w" sizes="(max-width: 860px) 100vw, 860px" /></a><br />
&nbsp;</p>
<p>With that out of the way, let&#8217;s change the access to allow limited, web only access for this site as well as a OneDrive site. To accomplish this we&#8217;re going to use the <strong><em>Set-SPOSite</em></strong> cmdlet along with the <strong><em>-ConditionalAccessPolicy</em></strong> Parameter.<br />
&nbsp;</p>
<p>This parameter supports the following inputs:</p>
<ul>
<li>AllowFullAccess: Allows full access from desktop apps, mobile apps, and the web</li>
<li>AllowLimitedAccess: Allows limited, web-only access</li>
<li>BlockAccess: Blocks Access</li>
<li>AuthenticationContext: Assign an Azure AD authentication context. Must add the AuthenticationContextName</li>
</ul>
<pre class="brush: powershell; title: ; notranslate">
$SiteURL = 'https://thesysadminchannel.sharepoint.com/sites/someproject'
$OneDriveURL = 'https://thesysadminchannel-my.sharepoint.com/personal/buzz_thesysadminchannel_com'

Set-SPOSite -Identity $SiteURL -ConditionalAccessPolicy AllowLimitedAccess
Set-SPOSite -Identity $OneDriveURL -ConditionalAccessPolicy AllowLimitedAccess

$SiteURL, $OneDriveURL | ForEach-Object {Get-SPOSite -Identity $_ | select Title, ConditionalAccessPolicy}

Title          ConditionalAccessPolicy
-----          -----------------------
SomeProject         AllowLimitedAccess
Buzz Lightyear      AllowLimitedAccess
</pre>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2023/09/Set-SPOSite-Conditional-Access-Block.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2023/09/Set-SPOSite-Conditional-Access-Block.png" alt="Set SPOSite Conditional Access Block" width="1040" height="387" class="aligncenter size-full wp-image-4855" srcset="https://thesysadminchannel.com/wp-content/uploads/2023/09/Set-SPOSite-Conditional-Access-Block.png?v=1695488188 1040w, https://thesysadminchannel.com/wp-content/uploads/2023/09/Set-SPOSite-Conditional-Access-Block-1024x381.png?v=1695488188 1024w, https://thesysadminchannel.com/wp-content/uploads/2023/09/Set-SPOSite-Conditional-Access-Block-768x286.png?v=1695488188 768w" sizes="(max-width: 1040px) 100vw, 1040px" /></a><br />
&nbsp;</p>
<p>Before you start checking the sites you set the limited access on, note that nothing is limited until we configure the CA policies.  It is strongly recommended that you do thorough testing before enabling this at the tenant level. Once you&#8217;ve done that and you&#8217;re ready to set it as the default, you can do that with another cmdlet.  That cmdlet is <strong><em>Set-SPOTenant</em></strong><br />
&nbsp;</p>
<div id="limitspotenant" style="scroll-margin-top: 10px;"></div>
<h4>Apply at the Tenant Level</h4>
<p>Now that you&#8217;re ready to enable this as the default on the tenant level, there is one thing we need to decide on.  That one thing is whether we want to enforce these restrictions on adhoc recipients. What exactly does that mean you say?<br />
&nbsp;</p>
<p>When the feature is enabled, all external users are going to be in scope of the restrictions and users who are accessing SharePoint Online files with a pass code are going to be blocked.<br />
&nbsp;</p>
<div id="blockquote1">
IMPORTANT:  By default when you set this at the tenant level, a conditional access policy is automatically created and scoped to ALL USERS. If you&#8217;re going to roll this out in stages (e.g. by department) I would suggest you immediately disable that policy and create a new CA policy that is finetuned to your liking.
</div>
<pre class="brush: powershell; title: ; notranslate">
Set-SPOTenant -ConditionalAccessPolicy AllowLimitedAccess -ApplyAppEnforcedRestrictionsToAdHocRecipients: $false
</pre>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2023/09/SharePoint-Limited-Access-PowerShell.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2023/09/SharePoint-Limited-Access-PowerShell.png" alt="SharePoint Limited Access PowerShell" width="860" height="214" class="aligncenter size-full wp-image-4863" /></a><br />
&nbsp;</p>
<p>When completed, we can also check the SharePoint Admin center to see the same thing.<br />
<a href="https://thesysadminchannel.com/wp-content/uploads/2023/09/SharePoint-Limited-Access-gui.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2023/09/SharePoint-Limited-Access-gui.png" alt="SharePoint Limited Access gui" width="1356" height="604" class="aligncenter size-full wp-image-4866" srcset="https://thesysadminchannel.com/wp-content/uploads/2023/09/SharePoint-Limited-Access-gui.png?v=1695492603 1356w, https://thesysadminchannel.com/wp-content/uploads/2023/09/SharePoint-Limited-Access-gui-1024x456.png?v=1695492603 1024w, https://thesysadminchannel.com/wp-content/uploads/2023/09/SharePoint-Limited-Access-gui-768x342.png?v=1695492603 768w" sizes="(max-width: 1356px) 100vw, 1356px" /></a><br />
&nbsp;</p>
<p>Finally, since doing this will automatically create a conditional access policy on our behalf, I would recommend disabling that and crafting one by hand so we can fine tune it to our liking.<br />
<a href="https://thesysadminchannel.com/wp-content/uploads/2023/09/Block-Unmanaged-Device-Conditional-Access-Policy.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2023/09/Block-Unmanaged-Device-Conditional-Access-Policy.png" alt="Block Unmanaged Device Conditional Access Policy" width="1053" height="194" class="aligncenter size-full wp-image-4873" srcset="https://thesysadminchannel.com/wp-content/uploads/2023/09/Block-Unmanaged-Device-Conditional-Access-Policy.png?v=1695493643 1053w, https://thesysadminchannel.com/wp-content/uploads/2023/09/Block-Unmanaged-Device-Conditional-Access-Policy-1024x189.png?v=1695493643 1024w, https://thesysadminchannel.com/wp-content/uploads/2023/09/Block-Unmanaged-Device-Conditional-Access-Policy-768x141.png?v=1695493643 768w" sizes="(max-width: 1053px) 100vw, 1053px" /></a></p>
<div id="limitexo" style="scroll-margin-top: 10px;"></div>
<h2>Limited Browser Access for Exchange Online</h2>
<p>Much like the SharePoint Online scenario, we can also limit browser access for users who are trying to access their email when on an unmanaged device. This setting is done using the OwaMailboxPolicy and is configurable for specific mailboxes or at the tenant level.  Before we take a look at each one, we need to connect to Exchange Online via PowerShell.</p>
<pre class="brush: powershell; title: ; notranslate">
Connect-ExchangeOnline -UserPrincipalName user@domain.com -ShowBanner: $false
</pre>
<p>&nbsp;</p>
<div id="limitexopermailbox" style="scroll-margin-top: 10px;"></div>
<h4>Apply on a Per-Mailbox Basis</h4>
<p>Again, it&#8217;s always a great idea to test on a few people to ensure you&#8217;re able to get the results you want.  There&#8217;s nothing worse than enabling a policy and having to revert back because of incidents that could have very well been avoided if it was properly tested.<br />
&nbsp;</p>
<p>To set the limited access on a few mailboxes we&#8217;re going to need to create a new OwaMailboxPolicy and then set the same conditional access parameter to readonly.<br />
&nbsp;<br />
In case you&#8217;re interested, here is what the supported inputs are for that parameter:</p>
<ul>
<li>Off: No conditional access policy is applied to Outlook on the web. This is the default value</li>
<li>ReadOnly: Users can&#8217;t download attachments to their local computer, and can&#8217;t enable Offline Mode on non-compliant computers. They can still view attachments in the browser</li>
<li>ReadOnlyPlusAttachmentsBlocked: All restrictions from ReadOnly apply, but users can&#8217;t view attachments in the browser</li>
</ul>
<p>&nbsp;</p>
<pre class="brush: powershell; title: ; notranslate">
$OwaPolicy = New-OwaMailboxPolicy -Name LimitAccess
Set-OwaMailboxPolicy -Identity LimitAccess -ConditionalAccessPolicy ReadOnly
Get-OwaMailboxPolicy | select Name, IsDefault, ConditionalAccessPolicy

Name                     IsDefault ConditionalAccessPolicy
----                     --------- -----------------------
OwaMailboxPolicy-Default      True Off
LimitAccess                  False ReadOnly
</pre>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2023/09/Set-OwaMailboxPolicy.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2023/09/Set-OwaMailboxPolicy.png" alt="Set OwaMailboxPolicy" width="860" height="249" class="aligncenter size-full wp-image-4876" srcset="https://thesysadminchannel.com/wp-content/uploads/2023/09/Set-OwaMailboxPolicy.png?v=1695495316 860w, https://thesysadminchannel.com/wp-content/uploads/2023/09/Set-OwaMailboxPolicy-768x222.png?v=1695495316 768w" sizes="(max-width: 860px) 100vw, 860px" /></a><br />
&nbsp;</p>
<p>With the OwaMailboxPolicy now created, let&#8217;s apply that policy to a few users so we can do our testing.  To apply we will use the <strong><em>Set-CASMailbox</em></strong> cmdlet.</p>
<pre class="brush: powershell; title: ; notranslate">
Set-CASMailbox darth -OwaMailboxPolicy LimitAccess
Get-CASMailbox darth | select DisplayName, OwaMailboxPolicy

DisplayName OwaMailboxPolicy
----------- ----------------
Darth Vader LimitAccess
</pre>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2023/09/Set-OwaMailboxPolicy-on-mailbox.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2023/09/Set-OwaMailboxPolicy-on-mailbox.png" alt="Set OwaMailboxPolicy on mailbox" width="853" height="264" class="aligncenter size-full wp-image-4878" srcset="https://thesysadminchannel.com/wp-content/uploads/2023/09/Set-OwaMailboxPolicy-on-mailbox.png?v=1695496064 853w, https://thesysadminchannel.com/wp-content/uploads/2023/09/Set-OwaMailboxPolicy-on-mailbox-768x238.png?v=1695496064 768w" sizes="(max-width: 853px) 100vw, 853px" /></a><br />
&nbsp;</p>
<div id="limitexotenant" style="scroll-margin-top: 10px;"></div>
<h4>Apply at the Tenant Level</h4>
<p>After we&#8217;ve tested for a bit, we can now apply this as the default setting at the tenant level.  To accomplish this, we will use the <strong><em>Set-OwaMailboxPolicy</em></strong> and and modify the &#8220;OwaMailboxPolicy-Default&#8221; to use the readonly conditional access policy.<br />
&nbsp;</p>
<pre class="brush: powershell; title: ; notranslate">
Set-OwaMailboxPolicy -Identity OwaMailboxPolicy-Default -ConditionalAccessPolicy ReadOnly
Get-OwaMailboxPolicy | select Name, IsDefault, ConditionalAccessPolicy

Name                     IsDefault ConditionalAccessPolicy
----                     --------- -----------------------
OwaMailboxPolicy-Default      True ReadOnly
LimitAccess                  False ReadOnly
</pre>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2023/09/Set-OwaMailboxPolicy-on-Tenant.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2023/09/Set-OwaMailboxPolicy-on-Tenant.png" alt="Set OwaMailboxPolicy on Tenant" width="899" height="231" class="aligncenter size-full wp-image-4880" srcset="https://thesysadminchannel.com/wp-content/uploads/2023/09/Set-OwaMailboxPolicy-on-Tenant.png?v=1695578800 899w, https://thesysadminchannel.com/wp-content/uploads/2023/09/Set-OwaMailboxPolicy-on-Tenant-768x197.png?v=1695578800 768w" sizes="(max-width: 899px) 100vw, 899px" /></a><br />
&nbsp;</p>
<div id="blockaccess" style="scroll-margin-top: 10px;"></div>
<h2>Block Unmanaged Devices Using Conditional Access</h2>
<p>If you&#8217;re wondering why nothing has changed after setting the SharePoint or Exchange settings, it&#8217;s because your conditional access policies are the tools that are going to be enforcing these restrictions.  The platform settings are the underlying scoping policies, however the conditional access policies are the overlying restriction setting.  Since we ended up setting both platform restrictions at the tenant level, the users we add (and ONLY those users) in the conditional access policy should have this setting enforced.  Hopefully that clears up any confusion.<br />
&nbsp;</p>
<p>Similar to the default SharePoint policies that were automatically created, there are 2 policies we need to create so we can block unmanaged devices as well as restrict browser access if they&#8217;re not on an IT issued device.  We can use those as rough templates to get us started.<br />
&nbsp;</p>
<p>Within Azure AD:</p>
<ul>
<li>Navigate to Security → Conditional Access → Policies → New Policy</li>
<ul>
<li>Direct Link: <a href="https://portal.azure.com/#view/Microsoft_AAD_ConditionalAccess/ConditionalAccessBlade/~/Policies" rel="noopener" target="_blank">Conditional Access Blade</a>
    </ul>
<li><strong>Name</strong>: CA015: Block Unmanaged Devices for All Users</li>
<li>Under Users:</li>
<ul>
<li><strong>Include</strong>: All Users (or smaller groups for testing)</li>
<li><strong>Exclude</strong>: Break glass account, MFA exclude group and all Guest users</li>
</ul>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2023/09/CA-Policy-User-Assignment.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2023/09/CA-Policy-User-Assignment.png" alt="CA Policy User Assignment" width="959" height="648" class="aligncenter size-full wp-image-4883" srcset="https://thesysadminchannel.com/wp-content/uploads/2023/09/CA-Policy-User-Assignment.png?v=1695584729 959w, https://thesysadminchannel.com/wp-content/uploads/2023/09/CA-Policy-User-Assignment-768x519.png?v=1695584729 768w" sizes="(max-width: 959px) 100vw, 959px" /></a></p>
<li>Under Target Resources:</li>
<ul>
<li><strong>Include</strong>: All Cloud Apps (or M365 Apps for testing)</li>
<li><strong>Exclude</strong>: None</li>
</ul>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2023/09/CA-Policy-App-Assignment.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2023/09/CA-Policy-App-Assignment.png" alt="CA Policy App Assignment" width="959" height="648" class="aligncenter size-full wp-image-4884" srcset="https://thesysadminchannel.com/wp-content/uploads/2023/09/CA-Policy-App-Assignment.png?v=1695584755 959w, https://thesysadminchannel.com/wp-content/uploads/2023/09/CA-Policy-App-Assignment-768x519.png?v=1695584755 768w" sizes="(max-width: 959px) 100vw, 959px" /></a></p>
<li>Under Conditions: No Changes needed (or exclude iOS and Android Devices for testing)</li>
<li>Under Grant:</li>
<ul>
<li><strong>Require device to be marked as compliant</strong>: Checked</li>
<li><strong>Require Hybrid Microsoft Entra joined device</strong>: Checked</li>
<li><strong>Require one of the selected controls</strong>: Is selected</li>
</ul>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2023/09/CA-Policy-Grant-Control.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2023/09/CA-Policy-Grant-Control.png" alt="CA Policy Grant Control" width="959" height="648" class="aligncenter size-full wp-image-4885" srcset="https://thesysadminchannel.com/wp-content/uploads/2023/09/CA-Policy-Grant-Control.png?v=1695584779 959w, https://thesysadminchannel.com/wp-content/uploads/2023/09/CA-Policy-Grant-Control-768x519.png?v=1695584779 768w" sizes="(max-width: 959px) 100vw, 959px" /></a></p>
<li>Under Sessions: No Changes needed</li>
</ul>
<p>&nbsp;</p>
<div id="restrictaccess" style="scroll-margin-top: 10px;"></div>
<h2>Restrict Browser Access on Unmanaged Devices Using Conditional Access</h2>
<p>Earlier we setup the policies on Exchange Online and SharePoint to be able to limit browser access while using an unmanaged device.  The policy on that platform is set, however, as mentioned earlier, we need to be able to enforce this using conditional access policies.  Let&#8217;s do that now.<br />
&nbsp;</p>
<p>Within Azure AD:</p>
<ul>
<li>Navigate to Security → Conditional Access → Policies → New Policy</li>
<ul>
<li>Direct Link: <a href="https://portal.azure.com/#view/Microsoft_AAD_ConditionalAccess/ConditionalAccessBlade/~/Policies" rel="noopener" target="_blank">Conditional Access Blade</a>
    </ul>
<li><strong>Name</strong>: CA016: Restrict Browser Access to Unmanaged Devices for All Users</li>
<li>Under Users:</li>
<ul>
<li><strong>Include</strong>: All Users (or smaller groups for testing)</li>
<li><strong>Exclude</strong>: Break glass account, MFA exclude group and all Guest users</li>
</ul>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2023/09/CA-Policy-User-Assignment-Restriction.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2023/09/CA-Policy-User-Assignment-Restriction.png" alt="CA Policy User Assignment Restriction" width="959" height="648" class="aligncenter size-full wp-image-4890" srcset="https://thesysadminchannel.com/wp-content/uploads/2023/09/CA-Policy-User-Assignment-Restriction.png?v=1695601587 959w, https://thesysadminchannel.com/wp-content/uploads/2023/09/CA-Policy-User-Assignment-Restriction-768x519.png?v=1695601587 768w" sizes="(max-width: 959px) 100vw, 959px" /></a></p>
<li>Under Target Resources:</li>
<ul>
<li><strong>Include</strong>: Office 365</li>
<li><strong>Exclude</strong>: None</li>
</ul>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2023/09/CA-Policy-Target-Resource-Restriction.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2023/09/CA-Policy-Target-Resource-Restriction.png" alt="CA Policy Target Resource Restriction" width="959" height="648" class="aligncenter size-full wp-image-4899" srcset="https://thesysadminchannel.com/wp-content/uploads/2023/09/CA-Policy-Target-Resource-Restriction.png?v=1695604471 959w, https://thesysadminchannel.com/wp-content/uploads/2023/09/CA-Policy-Target-Resource-Restriction-768x519.png?v=1695604471 768w" sizes="(max-width: 959px) 100vw, 959px" /></a></p>
<li>Under Conditions: </li>
<ul>
<li><strong>Client Apps → Browser</strong>: Checked</li>
</ul>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2023/09/CA-Policy-Conditions-Client-App-Restriction.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2023/09/CA-Policy-Conditions-Client-App-Restriction.png" alt="CA Policy Conditions Client App Restriction" width="959" height="648" class="aligncenter size-full wp-image-4900" srcset="https://thesysadminchannel.com/wp-content/uploads/2023/09/CA-Policy-Conditions-Client-App-Restriction.png?v=1695604502 959w, https://thesysadminchannel.com/wp-content/uploads/2023/09/CA-Policy-Conditions-Client-App-Restriction-768x519.png?v=1695604502 768w" sizes="(max-width: 959px) 100vw, 959px" /></a></p>
<li>Under Grant: No changes needed</li>
<li>Under Sessions:</li>
<ul>
<li><strong>Use app enforced restrictions</strong>: Checked</li>
</ul>
<p><a href="https://thesysadminchannel.com/wp-content/uploads/2023/09/CA-Policy-Session-App-Enforced-Restriction.png" target="_blank" rel="noopener"><img decoding="async" src="https://thesysadminchannel.com/wp-content/uploads/2023/09/CA-Policy-Session-App-Enforced-Restriction.png" alt="CA Policy Session App Enforced Restriction" width="959" height="648" class="aligncenter size-full wp-image-4901" srcset="https://thesysadminchannel.com/wp-content/uploads/2023/09/CA-Policy-Session-App-Enforced-Restriction.png?v=1695604537 959w, https://thesysadminchannel.com/wp-content/uploads/2023/09/CA-Policy-Session-App-Enforced-Restriction-768x519.png?v=1695604537 768w" sizes="(max-width: 959px) 100vw, 959px" /></a>
</ul>
<p>&nbsp;</p>
<div id="extensions" style="scroll-margin-top: 10px;"></div>
<h2>Incognito Mode and Browser Extensions</h2>
<p>One important item to call out is that your users can continue to have issues even though their device is compliant or Hybrid Azure AD Joined.  This is because certain browsers don&#8217;t have the functionality built-in to send the device payload so the CA policy can properly evaluate it.<br />
&nbsp;</p>
<ul>
<li>Edge: Functionality is built-in so testing with Edge is always recommended</li>
<li>Chrome: <a href="https://chrome.google.com/webstore/detail/windows-accounts/ppnbnpeolgkicgegkbkbjmhlideopiji" rel="noopener" target="_blank">Windows 10 accounts extension</a> is required for Chrome v111+</li>
<li>FireFox: <a href="https://support.mozilla.org/en-US/kb/windows-sso" rel="noopener" target="_blank">FireFox Windows SSO</a> is required</li>
<li>Incognito Mode: extensions should be abled for incognito mode as well</li>
</ul>
<p>If you&#8217;re STILL having issues after ensure your device is in the proper state and you have the proper extensions installed, one thing that I&#8217;ve learned is clear the cache and cookies and that resolves most of the issues.<br />
&nbsp;</p>
<div id="conclusion" style="scroll-margin-top: 10px;"></div>
<h2>Conclusion</h2>
<p>Hopefully this article on how to limit or restrict browser access to Microsoft 365 apps as well as block unmanaged devices using conditional access was insightful.  This should help add a bit more strength to your overall security posture so that&#8217;s always a good thing.<br />
&nbsp;</p>
<p>This policy is very powerful so you need to make sure you do some thorough testing before enabling the policy globally.  Another policy I would highly recommend is to <a href="https://thesysadminchannel.com/how-to-enable-authentication-strengths-using-azure-ad-conditional-access-policy/" rel="noopener" target="_blank">Enable Authentication Strengths Using Conditional Access</a> so you can set higher profile apps to use phishing resistant MFA.</p>
<p>The post <a href="https://thesysadminchannel.com/block-unmanaged-devices-using-conditional-access/">Block Unmanaged Devices Using Conditional Access</a> appeared first on <a href="https://thesysadminchannel.com">the Sysadmin Channel</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://thesysadminchannel.com/block-unmanaged-devices-using-conditional-access/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4839</post-id>	</item>
	</channel>
</rss>
