Skip to content

Conversation

@Jhope188
Copy link

@Jhope188 Jhope188 commented Nov 5, 2025

Added condition to exclude non-compliant devices from access.
Screenshot 2025-11-05 at 3 26 21 PM
This step was missing to truly only target noncompliant devices.

Added condition to exclude non-compliant devices from access.
@prmerger-automator
Copy link
Contributor

@Jhope188 : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change.

@learn-build-service-prod
Copy link
Contributor

Learn Build status updates of commit 6770ab3:

✅ Validation status: passed

File Status Preview URL Details
docs/identity/conditional-access/policy-all-users-app-enforced-restrictions.md ✅Succeeded

For more details, please refer to the build report.

@v-dirichards v-dirichards requested a review from Copilot November 5, 2025 21:15
@v-dirichards
Copy link
Contributor

@MicrosoftGuyJFlo

Can you review the proposed changes?

Important: When the changes are ready for publication, adding a #sign-off comment is the best way to signal that the PR is ready for the review team to merge.

#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a new conditional access filter step to exclude compliant and domain-joined devices from the app enforced restrictions policy. This allows organizations to apply restrictions only to unmanaged devices while exempting managed ones.

  • Adds a device filter condition to exclude devices that are both compliant and domain-joined

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

1. Under **Include**, choose **Select resources**.
1. Choose **Office 365**, then select **Select**.

1 Under **Condition** filter for devices **Exclude filtered devices** set to device.isCompliant -eq True -and device.trustType -eq "ServerAD"
Copy link

Copilot AI Nov 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be 'Conditions' (plural) not 'Condition' (singular) to match Microsoft Entra Conditional Access terminology.

Suggested change
1 Under **Condition** filter for devices **Exclude filtered devices** set to device.isCompliant -eq True -and device.trustType -eq "ServerAD"
1 Under **Conditions** filter for devices **Exclude filtered devices** set to device.isCompliant -eq True -and device.trustType -eq "ServerAD"

Copilot uses AI. Check for mistakes.
…-restrictions.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@learn-build-service-prod
Copy link
Contributor

Learn Build status updates of commit 0fb29a9:

✅ Validation status: passed

File Status Preview URL Details
docs/identity/conditional-access/policy-all-users-app-enforced-restrictions.md ✅Succeeded

For more details, please refer to the build report.

@prmerger-automator
Copy link
Contributor

Invalid command: '#sign-off'. Only the assigned author of one or more file in this PR can sign off. @MicrosoftGuyJFlo

@Jhope188
Copy link
Author

@MicrosoftGuyJFlo MicrosoftGuyJFlo are you able to review

@MicrosoftGuyJFlo
Copy link
Contributor

Pending Ignite release branch merge on Tuesday. Will approve and sign off after merge.

@v-dirichards
Copy link
Contributor

@MicrosoftGuyJFlo Are you waiting for something specific to merge first before this PR?

The PR review team will resume merging on the morning of the keynote address for the regularly scheduled daily publish cycles. If you sign off now, you don't need to take further action on this PR.

@nathanmcnulty
Copy link
Contributor

App enforced restrictions already handles determining managed vs unmanaged without the need for Filter for devices, so this really shouldn't be necessary.

Having said that, it shouldn't hurt anything to use Filter for devices to exclude compliant or hybrid joined devices, but you might consider changing it to an OR instead of an AND to have it operate the same way as Exchange and SharePoint handle app enforced restrictions ;)

@Jhope188
Copy link
Author

Jhope188 commented Nov 18, 2025 via email

@Jhope188
Copy link
Author

App enforced restrictions already handles determining managed vs unmanaged without the need for Filter for devices, so this really shouldn't be necessary.

Having said that, it shouldn't hurt anything to use Filter for devices to exclude compliant or hybrid joined devices, but you might consider changing it to an OR instead of an AND to have it operate the same way as Exchange and SharePoint handle app enforced restrictions ;)

That makes complete sense Nathan. Thank you for clarifying some aspects of how that operates. I see similar policies that do the app enforced restriction but still do the device filtering. Which your point makes sense. Not sure if should include it in the KB or not by switching to an And vs Or. Curious your thoughts?

@MicrosoftGuyJFlo
Copy link
Contributor

Thanks @nathanmcnulty. Agree with your points. I'd leave it out for now.

@Jhope188
Copy link
Author

Jhope188 commented Nov 20, 2025 via email

@nathanmcnulty
Copy link
Contributor

App enforced restrictions already handles determining managed vs unmanaged without the need for Filter for devices, so this really shouldn't be necessary.
Having said that, it shouldn't hurt anything to use Filter for devices to exclude compliant or hybrid joined devices, but you might consider changing it to an OR instead of an AND to have it operate the same way as Exchange and SharePoint handle app enforced restrictions ;)

That makes complete sense Nathan. Thank you for clarifying some aspects of how that operates. I see similar policies that do the app enforced restriction but still do the device filtering. Which your point makes sense. Not sure if should include it in the KB or not by switching to an And vs Or. Curious your thoughts?

Sorry I missed finishing a reply to you on this!

You can certainly use filter for devices to make the decision at Conditional Access rather than passing the decision along to the resource (like EXO or SPO). I've been trying to think through if there are any risks or downsides of one way over the other, and assuming the filter in the CA policy is configured the same (using OR logic) as what the resource uses, I can't think of any meaningful difference. Biggest risk is honestly misconfiguring the filter to do something like selecting include instead of exclude and not apply at all :p

@Jhope188
Copy link
Author

Jhope188 commented Nov 22, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants