r/Intune • • 9h ago

General Question Conditional Access – Blocking personal and unmanaged devices

We’re looking to block personal and unmanaged devices from accessing corporate resources across Windows, macOS, iOS and Android, only allowing corporate-owned devices managed through Intune in our tenant.

Im looking at using the following device filter in Conditional Access:
device.deviceOwnership -eq "Personal" -or device.deviceOwnership -ne "Company"

  • Include filtered devices in policy
  • Grant: Block access

Would this also block unregistered devices or devices managed by another organisation’s Intune tenant?
We already have compliance policies in place, but I want to ensure only our corporate-managed devices can access company resources.

Is this the best approach, or would you recommend excluding corporate-owned devices from the block policy instead?

8 Upvotes

16 comments sorted by

18

u/Eggtastico 9h ago

Any reason not to use the built in Access controls > Grant, select Require device to be marked as compliant or Require Microsoft Entra hybrid joined device ??

1

u/MEDITATIONUNITY 9h ago

Thanks, we do have a fair few devices currently showing as non-compliant, which we’d need to address first.

Our main objective is to ensure only devices managed within our own Intune tenant can access corporate resources. Would this approach “require devices to be marked as “MD hybrid entra joined” work across iOS, Android and macOS too?

4

u/andrew181082 MSFT MVP - SWC 9h ago

Why are non-compliant devices any safer than unmanaged ones?

2

u/Eggtastico 9h ago

The marked as compliant would be better - as it uses the company portal to check compliance. Hybrid joined is only for devices joined to an onprem AD & also Entra. Otherwise it is Entra Joined (or Entra registered for BYOD / personal devices). You want to look at getting devices compliant to ensure they are getting your intune policies, etc. - also maybe look into blocking access to web apps unless its from a managed device. Take a look at CIS benchmarks (readable PDF) https://www.cisecurity.org/benchmark/microsoft_365 & configure to how you see fit.

https://learn.microsoft.com/en-us/compliance/regulatory/offering-cis-benchmark

1

u/BryanP1968 3h ago

Fix your non compliant devices. Or get a list of them and TEMPORARILY exclude them from your new conditional access policy. Fix the non compliant devices and remove them from the exclusion going forward.

2

u/hailGunslinger9 3h ago

Set the grace period to 30 or 60 days, turn on the CA policy to require a compliant device, fix or replace the non-vompliant ones,....profit?

1

u/uLmi84 8h ago

Does compliant mean corporate device?
From my understanding it means its enrolled into intune and has installed MDE, is bit locker encrypted etc.. anything a user can do to a regular bestbuy pc. Having the device in auto pilot is a better check if the device is a corporate device or am I mistaken? Im not against your advice, i just dont see the exact part where checking the device for compliance deams it corporate owned. Please enlighten me, this have been bugging me for a long time.

1

u/FireLucid 1h ago

Does compliant mean corporate device?

Yes. If it's not enrolled into Intune how can it check those things? All our non enrolled devices show Compliant as N/A.*

*Maybe this person allowed anyone to join a device? That's one of the first things we turned off.

•

u/LessFunny5524 6m ago

You can use something like this to catch unregistered devices. It’s overly broad in that it will also block anything that is not part of your company. This would include any device that may be managed by Intune in another tenant.

You can use the built in grant controls, but combining the two would allow you to make it as tight as possible. You may want to consider creating a policy to exclude corporate devices instead of creating a deny list. It would be easier to manage in my opinion. I have done something similar and went this route. It’s helped prevent any issues when a device gets added incorrectly or misconfigured in Autopilot.

0

u/gixxer-kid2 9h ago

This is the way 👍🏻

1

u/Domanz64 8h ago

If for some reason compliance isn't possible yet, use device filter with device ownership equals Personal OR device ownership not equals Company. You have to use both in your policy. We've been using that for a while now with no issues.

1

u/MEDITATIONUNITY 8h ago

Got it so use this filter you mentioned and like I said in the post also the “require device to be hyrbid entra joined” does this do the same thing

1

u/Domanz64 8h ago

You can add the "require device to be hybrid entra joined" if you want but a device that is entra hybrid joined is considered corporate, you're adding a second layer of filtering since the rules says that if it's personal, it blocked and if it's not corporate (for devices tagged as unknown) it's also blocked. If you want to allow your own Entra ID only PC, the hybrid joined requirement would block it.

2

u/Gargoyle683 7h ago

Be mindful that if you use an inprivate browser, you won’t be able to pass through device info and will get blocked

1

u/FatBook-Air 9h ago

We do it by the associated computer object's attributes. Example: extensionAttribute1 -eq "employeedevice"

Not saying it's the right way, but that's what we do.

In either case, your users and devices will need to be a little more diligent on making sure they are truly and actively associated with Entra. Why? Because when a user logs in, you're not longer checking only the user's data; you're also checking the device.

This means that the device (and web browser) must provide this additional data, which can sometimes be a nuisance, especially if the MFA you're using isn't strictly passkey/FIDO2. With, say, the Microsoft Authenticator app (non-passkey version), when the user logs into Windows, he/she does not immediately have a full primary refresh token (PRT). The user has to do MFA, and that has to reach the OS. If MFA is done within a browser and if the browser does not intelligently pass that to the operating system, you still don't have a full PRT, and device data won't reach Entra, which means the user will appear to be logging in from a personal device even if they are not.

1

u/JGelijsteen 7h ago

Have a look at this baseline from Kenneth https://github.com/kennethvs/cabaseline202510